Better error handling for calling external commands
Handle OSError exception, the called command might be missing.
@@ -186,6 +186,9 @@ def call_command(command, env=None):
LOG.debug(str(ex.returncode))
LOG.debug(ex.output)
return ex.output, ex.returncode
+ except OSError as oerr:
+ LOG.warning(oerr.strerror)
+ return oerr.strerror, oerr.errno
def get_default_workspace():
