Commit af4664de authored by Philipp Hörist's avatar Philipp Hörist

[openpgp] Fix some errors

parent eb80f10c
......@@ -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
......
......@@ -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)))
......
......@@ -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}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment