From c7cb3b30782b8f1a593c192c297767d3ac653579 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Tue, 8 Sep 2020 10:41:27 +0200 Subject: openpgp: Fix bytes-to-str warnings by using !r (repr) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- gemato/openpgp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gemato/openpgp.py b/gemato/openpgp.py index 8bce73b..9668b0f 100644 --- a/gemato/openpgp.py +++ b/gemato/openpgp.py @@ -292,7 +292,7 @@ debug-level guru ret, sout, serr = self._spawn_gpg( [GNUPGCONF, '--kill', 'all']) if ret != 0: - logging.warning(f'{GNUPGCONF} --kill failed: {serr}') + logging.warning(f'{GNUPGCONF} --kill failed: {serr!r}') if not self.debug: # we need to loop due to ENOTEMPTY potential while os.path.isdir(self._home): @@ -372,7 +372,8 @@ debug-level guru ret[fpr].append(addr) else: logging.debug( - f'list_keys(): ignoring UID without mail: {uid}') + f'list_keys(): ignoring UID without mail: ' + f'{uid!r}') return ret -- cgit v1.2.3