From 3a28d2e6f7e397abeba0d5ecd30a5cc42bbf311e Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 8 Oct 2019 16:28:53 +0000 Subject: [PATCH] Merged in chrisclauss/nuttx/Christian-Clauss/old-style-exceptions-new-style-for-pyth-1569067472774 (pull request #1036) Old style exceptions --> new style for Python 3 Approved-by: Gregory Nutt --- tools/ide_exporter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ide_exporter.py b/tools/ide_exporter.py index f7c5385181..baecdd2a90 100755 --- a/tools/ide_exporter.py +++ b/tools/ide_exporter.py @@ -241,7 +241,7 @@ class IdeProject(object): self.saved_nodes[tag] = deepcopy(n) self.clear_src_nodes() # Clear all source node in template file - except Exception, e: + except Exception as e: print("ERR: {0}".format(str(e))) raise Exception("Can't init IdeProject object") @@ -292,7 +292,7 @@ class IdeProject(object): c = p.getparent() c.remove(p) p = element.find(node) - except Exception, e: + except Exception as e: print(str(e)) def clear_src_nodes(self): @@ -928,7 +928,7 @@ if __name__ == '__main__': try: if not os.path.exists(prj_dir): os.makedirs(prj_dir) - except Exception, e: + except Exception as e: print("ERR: {0}".format(str(e))) exit(1)