Use sys.exc_info() for exception msg in Python 2/3

This commit is contained in:
Enrico Tröger 2010-10-31 22:44:24 +01:00 committed by Christian Dywan
parent f2ca461638
commit 914d5e38f1

View file

@ -615,6 +615,6 @@ def shutdown ():
command += ' ' + relfolder + os.sep + APPNAME + os.sep + APPNAME
print (command)
Utils.exec_command (command)
# except Exception as msg:
except Exception, msg:
except Exception:
msg = sys.exc_info()[1] # Python 2/3 compatibility
Utils.pprint ('RED', "Failed to run application: " + str (msg))