Control: tags -1 + patch

For the record, I was mistaken about the problem also being present in
FreeCAD 0.21.  I was comparing against the wrong file locally to come to
this incorrect conclusion.  The follow change to the problematic
getargspec() calls are lifted from upstream.  Can you test to see if it
solve your problem?  There are other changes in 0.21 to this file, and I
am unsure if any of them are needed.  It might be a better idea to
upgrade FreeCAD in Debian to 0.21 instead of backporting this fix.

--- a/src/Mod/Draft/draftguitools/gui_snapper.py
+++ b/src/Mod/Draft/draftguitools/gui_snapper.py
@@ -1426,7 +1426,7 @@ class Snapper:
             Gui.Snapper.off()
             self.ui.offUi()
             if callback:
-                if len(inspect.getargspec(callback).args) > 1:
+                if len(inspect.getfullargspec(callback).args) > 1:
                     obj = None
                     if self.snapInfo and ("Object" in self.snapInfo) and 
self.snapInfo["Object"]:
                         obj = 
App.ActiveDocument.getObject(self.snapInfo["Object"])
@@ -1445,7 +1445,7 @@ class Snapper:
             Gui.Snapper.off()
             self.ui.offUi()
             if callback:
-                if len(inspect.getargspec(callback).args) > 1:
+                if len(inspect.getfullargspec(callback).args) > 1:
                     callback(None, None)
                 else:
                     callback(None)


-- 
Happy hacking
Petter Reinholdtsen

Reply via email to