Skip to content
Snippets Groups Projects
Commit 70dbf4256e87 authored by Houzefa Abbasbhay's avatar Houzefa Abbasbhay :slight_smile:
Browse files

docker_build.py: byte-to-string conv for Python 3

parent ff58048bc1db
No related branches found
No related tags found
No related merge requests found
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
buildargs = dict() buildargs = dict()
if os.path.exists('.hg'): if os.path.exists('.hg'):
buildargs['REVISION'] = check_output( buildargs['REVISION'] = check_output(
'hg identify -i'.split()).split()[0] 'hg identify -i'.split()).split()[0].decode('utf-8')
buildargs['CREATED'] = datetime.datetime.now().isoformat() buildargs['CREATED'] = datetime.datetime.now().isoformat()
if nmspc.build_arg: if nmspc.build_arg:
for arg in nmspc.build_arg: for arg in nmspc.build_arg:
...@@ -202,7 +202,7 @@ ...@@ -202,7 +202,7 @@
# this is for python docker 1.8-1.9 # this is for python docker 1.8-1.9
# TODO add compatibility with newer python docker # TODO add compatibility with newer python docker
for line in builder: for line in builder:
d = json.loads(line) d = json.loads(line.decode('utf-8'))
if 'stream' in d: if 'stream' in d:
logging.info(d['stream']) logging.info(d['stream'])
if 'errorDetail' in d: if 'errorDetail' in d:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment