You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
2.0 KiB
57 lines
2.0 KiB
2 months ago
|
diff --git a/base/tui.py b/base/tui.py
|
||
|
index 99bda7b..0f90f92 100644
|
||
|
--- a/base/tui.py
|
||
|
+++ b/base/tui.py
|
||
|
@@ -241,6 +241,7 @@ class ProgressMeter(object):
|
||
|
sys.stdout.write(y)
|
||
|
|
||
|
sys.stdout.flush()
|
||
|
+ sys.stdout.write('\n')
|
||
|
self.prev_length = len(y)
|
||
|
self.spinner_pos = (self.spinner_pos + 1) % 8
|
||
|
|
||
|
diff --git a/base/validation.py b/base/validation.py
|
||
|
index ee6b05a..5e955dc 100644
|
||
|
--- a/base/validation.py
|
||
|
+++ b/base/validation.py
|
||
|
@@ -42,8 +42,11 @@ class DigiSign_Verification(object):
|
||
|
|
||
|
|
||
|
class GPG_Verification(DigiSign_Verification):
|
||
|
- def __init__(self, pgp_site = 'pgp.mit.edu', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):
|
||
|
- self.__pgp_site = pgp_site
|
||
|
+ def __init__(self, keyservers = ['keyserver.ubuntu.com',
|
||
|
+ 'pgp.surf.nl',
|
||
|
+ 'pgp.mit.edu'],
|
||
|
+ key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):
|
||
|
+ self.__keyservers = keyservers
|
||
|
self.__key = key
|
||
|
self.__gpg = utils.which('gpg',True)
|
||
|
|
||
|
@@ -82,13 +85,18 @@ class GPG_Verification(DigiSign_Verification):
|
||
|
|
||
|
|
||
|
def __acquire_gpg_key(self):
|
||
|
-
|
||
|
- cmd = '%s --homedir %s --no-permission-warning --keyserver %s --recv-keys 0x%X' \
|
||
|
- % (self.__gpg, self.__gpg_dir, self.__pgp_site, self.__key)
|
||
|
-
|
||
|
- log.info("Receiving digital keys: %s" % cmd)
|
||
|
- status, output = utils.run(cmd)
|
||
|
- log.debug(output)
|
||
|
+ for kserver in self.__keyservers:
|
||
|
+ cmd = '%s --homedir %s --no-permission-warning --keyserver %s --recv-keys 0x%X' \
|
||
|
+ % (self.__gpg, self.__gpg_dir, kserver, self.__key)
|
||
|
+
|
||
|
+ log.info("Receiving digital keys: %s" % cmd)
|
||
|
+ status, output = utils.run(cmd)
|
||
|
+ log.debug(output)
|
||
|
+
|
||
|
+ if not status:
|
||
|
+ break
|
||
|
+ log.info("Receiving keys from {} failed, trying the next keyserver."
|
||
|
+ .format(kserver))
|
||
|
|
||
|
self.__change_owner(True)
|
||
|
|