[Pkg-privacy-commits] [torbrowser-launcher] 27/48: common.py: Add initial stuff for refresh_keyring method to Common class.

Roger Shimizu rosh at moszumanska.debian.org
Mon Sep 4 16:42:33 UTC 2017


This is an automated email from the git hooks/post-receive script.

rosh pushed a commit to branch debian/sid
in repository torbrowser-launcher.

commit 2af60db3947936751c480aa99e5d234d7081d062
Author: Dan Snider <dan at dephekt.net>
Date:   Sat Apr 8 14:05:51 2017 -0500

    common.py: Add initial stuff for refresh_keyring method to Common class.
---
 torbrowser_launcher/common.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/torbrowser_launcher/common.py b/torbrowser_launcher/common.py
index 52703bd..0a11109 100644
--- a/torbrowser_launcher/common.py
+++ b/torbrowser_launcher/common.py
@@ -205,6 +205,24 @@ class Common:
             self.mkdir(self.paths['gnupg_homedir'])
         self.import_keys()
 
+    def refresh_keyring(self, fingerprint=None):
+        if fingerprint is not None:
+            p = subprocess.Popen(['/usr/bin/gpg', '--status-fd', '2',
+                                  '--homedir', self.paths['gnupg_homedir'],
+                                  '--keyserver', 'pool.sks-keyservers.net',
+                                  '--recv-keys', fingerprint], stderr=subprocess.PIPE)
+
+            for output in p.stderr.readlines():
+                print output
+        else:
+            p = subprocess.Popen(['/usr/bin/gpg', '--status-fd', '2',
+                                  '--homedir', self.paths['gnupg_homedir'],
+                                  '--keyserver', 'pool.sks-keyservers.net',
+                                  '--refresh-keys'], stderr=subprocess.PIPE)
+
+            for output in p.stderr.readlines():
+                print output
+
     def import_key_and_check_status(self, key):
         """Import a GnuPG key and check that the operation was successful.
         :param str key: A string specifying the key's filepath from

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/torbrowser-launcher.git



More information about the Pkg-privacy-commits mailing list