conditional to supress eprecation warning in 0.20

This commit is contained in:
looooo
2021-07-04 21:48:27 +02:00
parent 7934657993
commit 6c6176b089

View File

@@ -83,7 +83,10 @@ class BaseGear(object):
# Needed to make this object "attachable",
# aka able to attach parameterically to other objects
# cf. https://wiki.freecadweb.org/Scripted_objects_with_attachment
obj.addExtension('Part::AttachExtensionPython', obj)
if int(App.Version()[1]) >= 20:
obj.addExtension('Part::AttachExtensionPython')
else:
obj.addExtension('Part::AttachExtensionPython', obj)
def execute(self, fp):
# checksbackwardcompatibility: