minor Py3 issue fixed
minor Py3 issue fixed

https://forum.freecadweb.org/viewtopic.php?f=10&t=30624&p=265892#p265892
fixing as suggested here:
https://hynek.me/articles/hasattr/
Fat-Zer/FreeCAD_sf_master,Fat-Zer/FreeCAD_sf_master,Fat-Zer/FreeCAD_sf_master,Fat-Zer/FreeCAD_sf_master,Fat-Zer/FreeCAD_sf_master