From: Marcin Krol Date: Mon, 22 Mar 2021 01:56:02 +0000 (+0100) Subject: - more python 3.x fixes X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=f49a6ac3665407036232096319a5643e80caedf3;p=tld-builder.git - more python 3.x fixes --- diff --git a/TLD_Builder/gpg.py b/TLD_Builder/gpg.py index 92e9b6a..b820dcd 100644 --- a/TLD_Builder/gpg.py +++ b/TLD_Builder/gpg.py @@ -35,7 +35,7 @@ def get_keys(buf): rx = re.compile("^gpg:.*using\s[DR]SA\skey\s(?:ID\s)?(\w+)") keys = [] - for l in d_stderr.split('\n'): + for l in d_stderr.decode().split('\n'): m = rx.match(l) if m: keys.append(m.group(1)) @@ -66,7 +66,7 @@ def verify_sig(buf): rx = re.compile("^gpg: (Good signature from| aka) .*<([^>]+)>") emails = [] - for l in d_stderr.split('\n'): + for l in d_stderr.decode().split('\n'): m = rx.match(l) if m: emails.append(m.group(2)) @@ -91,6 +91,6 @@ def sign(buf): raise if len(d_stderr): - log.error("gpg: %s" % d_stderr) + log.error("gpg: %s" % d_stderr.decode()) return d_stdout