Browse Source

px4_mkfw.py: fix byte to string conversion

release/1.12
Beat Küng 4 years ago committed by Daniel Agar
parent
commit
be3849f0b2
  1. 4
      Tools/px_mkfw.py

4
Tools/px_mkfw.py

@ -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")

Loading…
Cancel
Save