Commit a9552311 authored by Yuxin Wu's avatar Yuxin Wu

print unicode in subproc_call

parent 82330eb5
...@@ -230,11 +230,11 @@ def subproc_call(cmd, timeout=None): ...@@ -230,11 +230,11 @@ def subproc_call(cmd, timeout=None):
return output, 0 return output, 0
except subprocess.TimeoutExpired as e: except subprocess.TimeoutExpired as e:
logger.warn("Command timeout!") logger.warn("Command timeout!")
logger.warn(e.output) logger.warn(e.output.decode('utf-8'))
return e.output, -1 return e.output, -1
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:
logger.warn("Command failed: {}".format(e.returncode)) logger.warn("Command failed: {}".format(e.returncode))
logger.warn(e.output) logger.warn(e.output.decode('utf-8'))
return e.output, e.returncode return e.output, e.returncode
except Exception: except Exception:
logger.warn("Command failed to run: {}".format(cmd)) logger.warn("Command failed to run: {}".format(cmd))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment