From 6c6176b0891904b5ca978e813116ae040f725565 Mon Sep 17 00:00:00 2001 From: looooo Date: Sun, 4 Jul 2021 21:48:27 +0200 Subject: [PATCH] conditional to supress eprecation warning in 0.20 --- freecad/gears/features.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freecad/gears/features.py b/freecad/gears/features.py index 60558cc..627b157 100644 --- a/freecad/gears/features.py +++ b/freecad/gears/features.py @@ -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: