git://git.onelab.eu
/
nodemanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix wrong gre tunnel deleted when topology changes
[nodemanager.git]
/
ticket.py
diff --git
a/ticket.py
b/ticket.py
index
aa24b88
..
c6dc4f7
100644
(file)
--- a/
ticket.py
+++ b/
ticket.py
@@
-1,6
+1,3
@@
-# $Id$
-# $URL$
-
"""An extremely simple interface to the signing/verifying capabilities
of gnupg.
"""An extremely simple interface to the signing/verifying capabilities
of gnupg.
@@
-14,7
+11,7
@@
GPG = '/usr/bin/gpg'
def _popen_gpg(*args):
"""Return a Popen object to GPG."""
def _popen_gpg(*args):
"""Return a Popen object to GPG."""
- return Popen((GPG, '--batch', '--no-tty') + args,
+ return Popen((GPG, '--batch', '--no-tty') + args,
stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
def sign(data):
stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)
def sign(data):
@@
-37,9
+34,8
@@
def verify(signed_msg):
msg = p.stdout.read()
p.stdout.close()
p.stderr.close()
msg = p.stdout.read()
p.stdout.close()
p.stderr.close()
- if p.wait():
+ if p.wait():
return None # verification failed
else:
data, = loads(msg)[0]
return data
return None # verification failed
else:
data, = loads(msg)[0]
return data
-