diff --git a/poezio_omemo/__init__.py b/poezio_omemo/__init__.py index b5967dc..f90473c 100644 --- a/poezio_omemo/__init__.py +++ b/poezio_omemo/__init__.py @@ -170,7 +170,7 @@ class Plugin(E2EEPlugin): # and given a chance to resolve them already. self.display_error('I was not able to decrypt the message.') except (Exception,) as exn: - self.display_error('An error occured while attempting decryption.\n%r' % exn) + self.display_error(f'An error occured while attempting decryption.\n{exn}') raise return None @@ -215,15 +215,15 @@ class Plugin(E2EEPlugin): for error in exn.errors: if isinstance(error, MissingBundleException): self.display_error( - 'Could not find keys for device "%d" of recipient "%s". Skipping.' % - (error.device, error.bare_jid), + f'Could not find keys for device "{error.device}" ' + f'of recipient "{error.bare_jid}". Skipping.' ) jid = JID(error.bare_jid) device_list = expect_problems.setdefault(jid, []) device_list.append(error.device) except (IqError, IqTimeout) as exn: self.display_error( - 'An error occured while fetching information on a recipient.\n%r' % exn, + 'An error occured while fetching information on a recipient.\n{exn}' ) return None