Skip to content

Commit

Permalink
openpgp: Fix decoding bytestrings for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
mgorny committed Mar 16, 2019
1 parent bad2341 commit e7be516
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gemato/openpgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def refresh_keys_wkd(self):
addrs_key.add(addr)
else:
logging.debug('refresh_keys_wkd(): ignoring UID without mail: {}'
.format(uid))
.format(uid.decode('utf8')))

# grab the final set (also aborts when there are no keys)
if not addrs_key:
Expand All @@ -307,14 +307,14 @@ def refresh_keys_wkd(self):
# if at least one fetch failed, gpg returns unsuccessfully
if exitst != 0:
logging.debug('refresh_keys_wkd(): gpg --locate-keys failed: {}'
.format(err))
.format(err.decode('utf8')))
return False

# otherwise, xfer the keys
exitst, out, err = subenv._spawn_gpg(['--export'] + list(keys), '')
if exitst != 0:
logging.debug('refresh_keys_wkd(): gpg --export failed: {}'
.format(err))
.format(err.decode('utf8')))
return False

exitst, out, err = self._spawn_gpg(['--import',
Expand Down

0 comments on commit e7be516

Please sign in to comment.