From 3a85411df83c72524e1d451fcd943b5fde27cce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Thu, 24 Mar 2022 19:55:16 +0100 Subject: [PATCH] f-strings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- slixmpp_omemo/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index ac8af37..68b94ca 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -397,7 +397,7 @@ class XEP_0384(BasePlugin): # TODO: Slixmpp should handle pubsub#errors so we don't have to # fish the element ourselves precondition = exn.iq['error'].xml.find( - '{%s}%s' % (PUBSUB_ERRORS, 'precondition-not-met'), + f'{{{PUBSUB_ERRORS}}}precondition-not-met' ) if precondition is not None: log.debug('The node we tried to publish was already ' @@ -417,7 +417,7 @@ class XEP_0384(BasePlugin): async def _fetch_bundle(self, jid: str, device_id: int) -> Optional[ExtendedPublicBundle]: log.debug('Fetching bundle for JID: %r, device: %r', jid, device_id) - node = '%s:%d' % (OMEMO_BUNDLES_NS, device_id) + node = f'{OMEMO_BUNDLES_NS}:{device_id}' try: iq = await self.xmpp['xep_0060'].get_items(jid, node) except (IqError, IqTimeout):