[PATCH] support for gnupg-agent
Carl Chenet
carl.chenet at ohmytux.com
Tue Jun 30 21:22:46 UTC 2009
---
reportbug/submit.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/reportbug/submit.py b/reportbug/submit.py
index 3c64011..de74950 100644
--- a/reportbug/submit.py
+++ b/reportbug/submit.py
@@ -118,11 +118,16 @@ def sign_message(body, fromaddr, package='x', pgp_addr=None, sign='gpg'):
signed.close()
if sign == 'gpg':
- signcmd = "gpg --local-user '%s' --clearsign" % pgp_addr
+ os.unlink(file2)
+ if 'GPG_AGENT_INFO' not in os.environ:
+ signcmd = "gpg --local-user '%s' --clearsign " % pgp_addr
+ else:
+ signcmd = "gpg --local-user '%s' --use-agent --clearsign " % pgp_addr
+ signcmd += '--output '+commands.mkarg(file2)+ ' ' + commands.mkarg(file1)
else:
signcmd = "pgp -u '%s' -fast" % pgp_addr
+ signcmd += '<'+commands.mkarg(file1)+' >'+commands.mkarg(file2)
- signcmd += '<'+commands.mkarg(file1)+' >'+commands.mkarg(file2)
try:
os.system(signcmd)
x = file(file2, 'r')
--
1.5.4.3
--=-q785bulmmKPWKPUdy8E7--
More information about the Reportbug-maint
mailing list