[wmlunits] Don't abort un uncaught exceptions.

Instead keep going to the next addon during pre-parsing of user addons.
This commit is contained in:
Allefant 2014-01-16 17:44:17 +01:00
parent 3f6c2e414c
commit dc4670b897

View file

@ -149,7 +149,8 @@ def list_contents():
#print("local", s, local.wesnoth)
p.join()
if s == "e":
raise local.wesnoth
remote_exception = local.wesnoth
raise remote_exception
def get_version(addon):
try:
@ -234,6 +235,14 @@ def list_contents():
ef.write("</TIMEOUT ERROR>\n")
ef.close()
sys.stdout.write("failed\n")
except Exception as e:
ef = open(logname, "w")
ef.write("<INTERNAL ERROR>\n")
ef.write(str(e))
ef.write("</INTERNAL ERROR>\n")
ef.close()
sys.stdout.write("failed\n")
finally:
move(options.config_dir + "/data/add-ons", options.addons, addon)