Skip to content

Commit 370139a

Browse files
committed
temp fix for petercorke#222
1 parent 14570df commit 370139a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

roboticstoolbox/robot/Robot.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,13 @@ def configurations_str(self):
409409
def angle(theta, fmt=None):
410410

411411
if fmt is not None:
412-
return fmt.format(theta * deg) + "\u00b0"
413-
else: # pragma nocover
414-
return str(theta * deg) + "\u00b0"
412+
try:
413+
return fmt.format(theta * deg) + "\u00b0"
414+
except TypeError:
415+
pass
416+
417+
# pragma nocover
418+
return str(theta * deg) + "\u00b0"
415419

416420
# show named configurations
417421
if len(self._configdict) > 0:

0 commit comments

Comments
 (0)