Merge "Fixed issues on Python 3"
This commit is contained in:
commit
dfb4eaed3d
|
@ -33,6 +33,8 @@ class Message(object):
|
|||
|
||||
try:
|
||||
if message_handle:
|
||||
if isinstance(message_handle.body, bytes):
|
||||
message_handle.body = message_handle.body.decode('utf-8')
|
||||
self.body = anyjson.loads(message_handle.body)
|
||||
else:
|
||||
self.body = None
|
||||
|
|
|
@ -43,7 +43,7 @@ class ExecutionPlanRunner(object):
|
|||
@staticmethod
|
||||
def _unindent(script, initial_indent):
|
||||
lines = script.expandtabs(4).split('\n')
|
||||
min_indent = sys.maxint
|
||||
min_indent = six.MAXSIZE
|
||||
for line in lines:
|
||||
indent = -1
|
||||
for i, c in enumerate(line):
|
||||
|
|
|
@ -70,11 +70,13 @@ class ApplicationExecutor(object):
|
|||
LOG.debug("Script {0} execution finished "
|
||||
"with retcode: {1}".format(script_name, retcode))
|
||||
if stdout is not None:
|
||||
stdout = stdout.decode('utf-8')
|
||||
if hasattr(stdout, 'decode'):
|
||||
stdout = stdout.decode('utf-8')
|
||||
LOG.debug(u"'{0}' execution stdout: "
|
||||
u"'{1}'".format(script_name, stdout))
|
||||
if stderr is not None:
|
||||
stderr = stderr.decode('utf-8')
|
||||
if hasattr(stderr, 'decode'):
|
||||
stderr = stderr.decode('utf-8')
|
||||
LOG.debug(u"'{0}' execution stderr: "
|
||||
u"'{1}'".format(script_name, stderr))
|
||||
result = {
|
||||
|
|
Loading…
Reference in New Issue