px4_mkfw.py: fix byte to string conversion

This commit is contained in:
Beat Küng 2021-02-18 13:23:21 +01:00 committed by Daniel Agar
parent bac2a02a65
commit be3849f0b2
1 changed files with 2 additions and 2 deletions

View File

@ -101,11 +101,11 @@ if args.description != None:
if args.git_identity != None: if args.git_identity != None:
cmd = "git --git-dir '{:}/.git' describe --exclude ext/* --always --tags".format(args.git_identity) cmd = "git --git-dir '{:}/.git' describe --exclude ext/* --always --tags".format(args.git_identity)
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout
desc['git_identity'] = str(p.read().strip()) desc['git_identity'] = p.read().strip().decode('utf-8')
p.close() p.close()
cmd = "git --git-dir '{:}/.git' rev-parse --verify HEAD".format(args.git_identity) cmd = "git --git-dir '{:}/.git' rev-parse --verify HEAD".format(args.git_identity)
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout
desc['git_hash'] = str(p.read().strip()) desc['git_hash'] = p.read().strip().decode('utf-8')
p.close() p.close()
if args.parameter_xml != None: if args.parameter_xml != None:
f = open(args.parameter_xml, "rb") f = open(args.parameter_xml, "rb")