diff options
author | Philipp Hörist <philipp@hoerist.com> | 2018-11-02 22:51:01 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2018-11-10 03:15:07 +0300 |
commit | 8dcd994a7c01990d53b2e9fb913c69c61f586ae7 (patch) | |
tree | 4bab0b47778b088944a36da3608f3a3516b2698f | |
parent | c8415e844a553d1bd2b0cd129a55c4851a4c21bd (diff) |
[openpgp] Fix some errors
-rw-r--r-- | openpgp/modules/openpgp.py | 6 | ||||
-rw-r--r-- | openpgp/modules/pgp_keylist.py | 2 | ||||
-rw-r--r-- | openpgp/modules/util.py | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/openpgp/modules/openpgp.py b/openpgp/modules/openpgp.py index b39c0d7..4f2b0ac 100644 --- a/openpgp/modules/openpgp.py +++ b/openpgp/modules/openpgp.py @@ -109,9 +109,9 @@ class ContactData: @property def userid(self): - if self._jid is None: + if self.jid is None: raise ValueError('JID not set') - return 'xmpp:%s' % self._jid + return 'xmpp:%s' % self.jid @property def default_trust(self): @@ -185,7 +185,7 @@ class ContactData: try: keydata = self._key_store[fingerprint] except KeyError: - log.warning('Set public key on unknown fingerprint', + log.warning('Set public key on unknown fingerprint: %s %s', self.jid, fingerprint) else: keydata.has_pubkey = True diff --git a/openpgp/modules/pgp_keylist.py b/openpgp/modules/pgp_keylist.py index 02a1398..e4e5b47 100644 --- a/openpgp/modules/pgp_keylist.py +++ b/openpgp/modules/pgp_keylist.py @@ -95,7 +95,7 @@ class PGPKeylist(AbstractPEPModule): else: timestamp = parse_datetime(date, epoch=True) if timestamp is None: - raise StanzaMalformed('Invalid date timestamp: %s', date) + raise StanzaMalformed('Invalid date timestamp: %s' % date) keylist.append(Key(attrs['v4-fingerprint'], int(timestamp))) diff --git a/openpgp/modules/util.py b/openpgp/modules/util.py index eb5c2c7..7934819 100644 --- a/openpgp/modules/util.py +++ b/openpgp/modules/util.py @@ -207,7 +207,7 @@ def get_info_message(): return '[This message is *encrypted* with OpenPGP (See :XEP:`0373`]' -def add_additional_data(data, fingerprint, trust): +def add_additional_data(data, fingerprint): data['encrypted'] = {'name': ENCRYPTION_NAME, 'fingerprint': fingerprint} |