mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
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 <gnutt@nuttx.org>
This commit is contained in:
committed by
Gregory Nutt
parent
60814806a4
commit
3a28d2e6f7
@@ -241,7 +241,7 @@ class IdeProject(object):
|
|||||||
self.saved_nodes[tag] = deepcopy(n)
|
self.saved_nodes[tag] = deepcopy(n)
|
||||||
|
|
||||||
self.clear_src_nodes() # Clear all source node in template file
|
self.clear_src_nodes() # Clear all source node in template file
|
||||||
except Exception, e:
|
except Exception as e:
|
||||||
print("ERR: {0}".format(str(e)))
|
print("ERR: {0}".format(str(e)))
|
||||||
raise Exception("Can't init IdeProject object")
|
raise Exception("Can't init IdeProject object")
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ class IdeProject(object):
|
|||||||
c = p.getparent()
|
c = p.getparent()
|
||||||
c.remove(p)
|
c.remove(p)
|
||||||
p = element.find(node)
|
p = element.find(node)
|
||||||
except Exception, e:
|
except Exception as e:
|
||||||
print(str(e))
|
print(str(e))
|
||||||
|
|
||||||
def clear_src_nodes(self):
|
def clear_src_nodes(self):
|
||||||
@@ -928,7 +928,7 @@ if __name__ == '__main__':
|
|||||||
try:
|
try:
|
||||||
if not os.path.exists(prj_dir):
|
if not os.path.exists(prj_dir):
|
||||||
os.makedirs(prj_dir)
|
os.makedirs(prj_dir)
|
||||||
except Exception, e:
|
except Exception as e:
|
||||||
print("ERR: {0}".format(str(e)))
|
print("ERR: {0}".format(str(e)))
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user