X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ticket.py;h=c45e8653925f47f0576ed39f1141fa55dd107a5e;hb=refs%2Fheads%2Fplanetlab-4_0-branch;hp=8ba00d2f39a8472e3f775372cf38502dddf73437;hpb=191f762aee7f7412e3d3b3840de914b9326aa888;p=nodemanager.git diff --git a/ticket.py b/ticket.py index 8ba00d2..c45e865 100644 --- a/ticket.py +++ b/ticket.py @@ -12,7 +12,7 @@ GPG = '/usr/bin/gpg' def sign(data): """Return signed with the default GPG key.""" - msg = dumps((data,)) + msg = dumps((data,), methodresponse = True) p = _popen_gpg('--armor', '--sign', '--keyring', '/etc/planetlab/secring.gpg', '--no-default-keyring') p.stdin.write(msg) p.stdin.close() @@ -37,4 +37,4 @@ def verify(signed_msg): def _popen_gpg(*args): """Return a Popen object to GPG.""" - return Popen((GPG, '--batch', '--no-tty') + args, stdin=PIPE, stdout=PIPE, stderr=PIPE) + return Popen((GPG, '--batch', '--no-tty') + args, stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=True)