f-strings

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-03-24 19:55:16 +01:00
parent 13052817bf
commit 3a85411df8

View file

@ -397,7 +397,7 @@ class XEP_0384(BasePlugin):
# TODO: Slixmpp should handle pubsub#errors so we don't have to # TODO: Slixmpp should handle pubsub#errors so we don't have to
# fish the element ourselves # fish the element ourselves
precondition = exn.iq['error'].xml.find( precondition = exn.iq['error'].xml.find(
'{%s}%s' % (PUBSUB_ERRORS, 'precondition-not-met'), f'{{{PUBSUB_ERRORS}}}precondition-not-met'
) )
if precondition is not None: if precondition is not None:
log.debug('The node we tried to publish was already ' 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]: async def _fetch_bundle(self, jid: str, device_id: int) -> Optional[ExtendedPublicBundle]:
log.debug('Fetching bundle for JID: %r, device: %r', jid, device_id) 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: try:
iq = await self.xmpp['xep_0060'].get_items(jid, node) iq = await self.xmpp['xep_0060'].get_items(jid, node)
except (IqError, IqTimeout): except (IqError, IqTimeout):