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
mentors.debian.net
debexpo
Commits
a00a48c4
Commit
a00a48c4
authored
Oct 08, 2012
by
Clément Schreiner
Browse files
Typos, style.
parent
4c33e551
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/lib/gnupg2.py
View file @
a00a48c4
...
...
@@ -61,11 +61,12 @@ GPG_ADDR_PATTERN = r"^(pub\s+(?P<key_id>\S+)\s+(?P<key_date>\S+)\s|uid\s+)(?P<ui
# Result objects
#
GpgFileSignature
=
namedtuple
(
'GpgFileSignature'
,
[
'is_valid'
,
# boolean: signature status
'key_id'
,
'key_type'
,
'data'
,
# plaintext
])
GpgFileSignature
=
namedtuple
(
'GpgFileSignature'
,
[
'is_valid'
,
# boolean: signature status
'key_id'
,
'key_type'
,
'data'
,
# plaintext
])
GpgKey
=
namedtuple
(
'GpgKey'
,
[
'id'
,
'type'
,
'strength'
])
...
...
@@ -91,7 +92,7 @@ class InvalidGnupgRunInvocation(Exception):
class
GpgVerifyNoData
(
Exception
):
""" No data has been given to gnupg --decrypt """
class
GpgVeri
t
yInvalidData
(
Exception
):
class
GpgVeri
f
yInvalidData
(
Exception
):
""" Invalid data given to gnupg --decrypt """
...
...
@@ -102,7 +103,7 @@ class GpgVerityInvalidData(Exception):
class
GnuPG
(
object
):
""" Wrapper for some GnuPG operations """
def
__init__
(
self
,
gpg_path
,
default_keyring
)
:
def
__init__
(
self
,
gpg_path
=
None
,
default_keyring
:
self
.
gpg_path
=
gpg_path
self
.
default_keyring
=
default_keyring
...
...
@@ -269,7 +270,9 @@ class GnuPG(object):
if
args
is
not
None
:
cmd
.
extend
(
args
)
process
=
subprocess
.
Popen
(
cmd
,
stdin
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
)
process
=
subprocess
.
Popen
(
cmd
,
stdin
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
)
(
output
,
outerr
)
=
process
.
communicate
(
input
=
stdin
)
status
=
process
.
returncode
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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