aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/build-firmware-package.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/build-firmware-package.py b/scripts/build-firmware-package.py
index 1a96fc7..4f078f4 100755
--- a/scripts/build-firmware-package.py
+++ b/scripts/build-firmware-package.py
@@ -14,10 +14,10 @@ parser.add_argument("firmware", nargs = "+", help = "firmware
args = parser.parse_args()
tar = tarfile.TarFile.open(fileobj = args.tarfile, mode = "w|gz")
-head = subprocess.check_output(("git", "rev-parse", "HEAD")).strip()
-time = subprocess.check_output(("git", "show", "-s", "--format=%ct", "HEAD")).strip()
+head = subprocess.check_output(("git", "rev-parse", "HEAD")).strip().decode()
+time = subprocess.check_output(("git", "show", "-s", "--format=%ct", "HEAD")).strip().decode()
commits = dict((path, hash) for hash, path, branch in
- (line.split() for line in subprocess.check_output(("git", "submodule", "status")).splitlines()))
+ (line.decode().split() for line in subprocess.check_output(("git", "submodule", "status")).splitlines()))
sha256 = {}
for fn in args.firmware:
@@ -34,7 +34,7 @@ with tempfile.NamedTemporaryFile() as f:
jf = gpg.stdin
else:
jf = f
- json.dump(dict(head = head, time = time, commits = commits, sha256 = sha256), jf, indent = 2)
+ jf.write(json.dumps(dict(head = head, time = time, commits = commits, sha256 = sha256), indent = 2).encode())
if use_gpg:
gpg.stdin.close()
if gpg.wait():