Commit 7a992cbc authored by Andrii Salnikov's avatar Andrii Salnikov

explicit binary mode in open for python3 compatibility

parent 8f5d0e7b
......@@ -1425,7 +1425,7 @@ def software_object_from_json(jconf):
if gpgproc.returncode != 0 or not os.path.exists(keyout):
logger.error('Failed to export public key from GPG database')
sys.exit(1)
with open(keyout, 'r') as key_f:
with open(keyout, 'rb') as key_f:
jconf['pubkey'] = base64.b64encode(key_f.read())
os.unlink(keyout)
......@@ -1544,7 +1544,7 @@ def software_object_from_json(jconf):
})
else:
# or embedd RTE into the DNS
with open(srtepath, 'r') as srte_f:
with open(srtepath, 'rb') as srte_f:
if 'contains' not in rteobj:
rteobj['contains'] = []
rteobj['contains'].append({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment