diff --git a/core/utils/exec_cmd.py b/core/utils/exec_cmd.py index 2b0c145c3372847363c54e93485c302527aa8faa..5e8f38e55bf15339796a64ed14bf119db7d1c971 100644 --- a/core/utils/exec_cmd.py +++ b/core/utils/exec_cmd.py @@ -206,8 +206,10 @@ class ExecCmd(object): break data += bufferline if not self.is_quiet: + # To support python2, we should encode the data + output = data.encode('utf-8') if sys.version_info.major < 3 else data try: - print(data,end='') + print(output, end='') except Exception as e: logger.debug("-------------------------------") raise BaseException("{}\n{}".format(e, traceback.format_exc()))