[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.5-5-gdf777ff

Sandro Tosi morph at debian.org
Fri Jul 3 11:28:38 UTC 2009


The following commit has been merged in the master branch:
commit 41ec9927032cbe48d51e7b98b3aec1df6bde3a3a
Author: Carl Chenet <carl.chenet at ohmytux.com>
Date:   Tue Jun 30 23:22:46 2009 +0200

    support for gnupg-agent

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')

-- 
Reportbug - reports bugs in the Debian distribution



More information about the Reportbug-commits mailing list