From 47a9f2d4d3a39a0595c0dc43378229dac0ccd116 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 15 Aug 2014 19:08:32 +0200 Subject: [PATCH] urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with `Exception as e`. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info. --- urdf_parser_py/src/urdf_parser_py/xml_reflection/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/urdf_parser_py/src/urdf_parser_py/xml_reflection/core.py b/urdf_parser_py/src/urdf_parser_py/xml_reflection/core.py index 755733be..e45fd70d 100644 --- a/urdf_parser_py/src/urdf_parser_py/xml_reflection/core.py +++ b/urdf_parser_py/src/urdf_parser_py/xml_reflection/core.py @@ -211,7 +211,7 @@ def from_xml(self, node): for value_type in self.type_order: try: return value_type.from_xml(node) - except Exception, e: + except Exception as e: error_set.append((value_type, e)) # Should have returned, we encountered errors out = "Could not perform duck-typed parsing."