diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/contact.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/contact.py b/plugins/contact.py index 070fbe4c..13dcc42f 100644 --- a/plugins/contact.py +++ b/plugins/contact.py @@ -40,18 +40,18 @@ class Plugin(BasePlugin): field_value = values[var] if field_value: value = sep.join(field_value) if isinstance(field_value, list) else field_value - contacts.append('%s: %s' % (title, value)) + contacts.append(f'{title}: {value}') if contacts: self.api.information('\n'.join(contacts), 'Contact Info') else: - self.api.information('No Contact Addresses for %s' % iq['from'], 'Error') + self.api.information(f'No Contact Addresses for {iq["from"]}', 'Error') async def command_disco(self, jid): try: iq = await self.core.xmpp.plugin['xep_0030'].get_info(jid=jid, cached=False) self.on_disco(iq) - except InvalidJID as e: - self.api.information('Invalid JID ā%sā: %s' % (jid, e), 'Error') + except InvalidJID as exn: + self.api.information(f'Invalid JID ā{jid}ā: {exn}', 'Error') except (IqError, IqTimeout,) as exn: ifrom = exn.iq['from'] condition = exn.iq['error']['condition'] |