Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Malte L
gajim-plugins
Commits
af4664de
Commit
af4664de
authored
Nov 02, 2018
by
Philipp Hörist
Browse files
[openpgp] Fix some errors
parent
eb80f10c
Changes
3
Show whitespace changes
Inline
Side-by-side
openpgp/modules/openpgp.py
View file @
af4664de
...
...
@@ -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
...
...
openpgp/modules/pgp_keylist.py
View file @
af4664de
...
...
@@ -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
)))
...
...
openpgp/modules/util.py
View file @
af4664de
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment