Exit gracefully on system.run() error

Former-commit-id: 0c83dae656
pull/1161/head
Dakota Benjamin 2016-03-03 13:36:04 -05:00
rodzic a4f431e04d
commit 6b50126d30
2 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -30,6 +30,10 @@ def ODM_ERROR(str):
logging.error(str)
def ODM_EXCEPTION(str):
logging.exception(str)
def ODM_DEBUG(str):
logging.debug(str)

Wyświetl plik

@ -23,6 +23,7 @@ def run(cmd):
if (returnCode != 0):
log.ODM_ERROR("quitting cause: \n\t" + cmd + "\nreturned with code " +
str(returnCode) + ".\n")
sys.exit('An error occurred. Check stdout above or the logs.')
def now():