subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1800545 - /subversion/trunk/tools/dist/release.py
Date Sun, 02 Jul 2017 05:38:23 GMT
Author: danielsh
Date: Sun Jul  2 05:38:23 2017
New Revision: 1800545

URL: http://svn.apache.org/viewvc?rev=1800545&view=rev
Log:
release.py: Another incremental improvement.

* tools/dist/release.py
  (get_siginfo): Replace longhand code with subprocess.check_output().
    It's 2017, we can assume it now.

Modified:
    subversion/trunk/tools/dist/release.py

Modified: subversion/trunk/tools/dist/release.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/release.py?rev=1800545&r1=1800544&r2=1800545&view=diff
==============================================================================
--- subversion/trunk/tools/dist/release.py (original)
+++ subversion/trunk/tools/dist/release.py Sun Jul  2 05:38:23 2017
@@ -870,14 +870,10 @@ def get_siginfo(args, quiet=False):
         #
         # NOTE: The following code assumes that 'gpg' is a gpg1 binary.  gpg2
         # produces different output.
-        gpg = subprocess.Popen(['gpg', '--keyid-format', 'long', '--fingerprint', id],
-                               stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-        rc = gpg.wait()
-        gpg_output = gpg.stdout.read()
-        if rc:
-            print(gpg_output)
-            sys.stderr.write("UNABLE TO GET FINGERPRINT FOR %s" % id)
-            sys.exit(1)
+        gpg_output = subprocess.check_output(
+            ['gpg1', '--keyid-format', 'long', '--fingerprint', id],
+            stderr=subprocess.STDOUT,
+        )
 
         gpg_output = "\n".join([ l for l in gpg_output.splitlines()
                                                      if l[0:7] != 'Warning' ])



Mime
View raw message