watch-logs: fix py3 encoding issues

This commit is contained in:
Mike McLean 2017-06-15 19:12:59 -04:00 committed by Tomas Kopecek
parent 3c548a9923
commit 94f116e898
2 changed files with 3 additions and 2 deletions

View file

@ -374,7 +374,7 @@ def watch_logs(session, tasklist, opts, poll_interval):
sys.stdout.write("\n")
sys.stdout.write("==> %s <==\n" % currlog)
lastlog = currlog
sys.stdout.write(contents)
sys.stdout.write(contents.decode('utf8'))
if not tasklist:
break

View file

@ -2680,7 +2680,8 @@ class ClientSession(object):
if volume and volume != 'DEFAULT':
dlopts['volume'] = volume
result = self.callMethod('downloadTaskOutput', taskID, fileName, **dlopts)
return base64.decodestring(result)
return base64.decodestring(result.encode('ascii'))
class DBHandler(logging.Handler):
"""