From 1fc468912c2c5d6a0c63bb0ce32717237e6ca7bd Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Sat, 12 Mar 2022 20:00:40 -0600 Subject: [PATCH] Path: Improve value assignment syntax for radius --- src/Mod/Path/PathScripts/PathDressupHoldingTags.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py index 66e84961c2..3be01251ab 100644 --- a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py +++ b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py @@ -134,10 +134,9 @@ class Tag: self.height = math.fabs(height) self.actualHeight = self.height self.angle = math.fabs(angle) - if hasattr(radius, "Value"): - self.radius = radius.Value - else: - self.radius = FreeCAD.Units.Quantity(radius, FreeCAD.Units.Length).Value + self.radius = getattr( + radius, "Value", FreeCAD.Units.Quantity(radius, FreeCAD.Units.Length).Value + ) self.enabled = enabled self.isSquare = False