From: "Brian Dolbec" <dolsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoo-keys:master commit in: gkeys/gkeys/
Date: Sat, 7 Jul 2018 05:23:49 +0000 (UTC) [thread overview]
Message-ID: <1530940930.5ac5f27889115cd48e89e910a3d12380367cccb6.dolsen@gentoo> (raw)
commit: 5ac5f27889115cd48e89e910a3d12380367cccb6
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 24 09:11:08 2016 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Jul 7 05:22:10 2018 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=5ac5f278
gkeys base.py: Remove the auto-update code from run()
This code was causing the fetch-seed action to fail with empty urls to connect to.
This code should also not be running directly from the CliBase class.
I'll move this code to the actions or lib class, to be determined later.
gkeys/gkeys/base.py | 58 -----------------------------------------------------
1 file changed, 58 deletions(-)
diff --git a/gkeys/gkeys/base.py b/gkeys/gkeys/base.py
index 3ecbd1b..a67b330 100644
--- a/gkeys/gkeys/base.py
+++ b/gkeys/gkeys/base.py
@@ -358,7 +358,6 @@ class CliBase(object):
return False
return True
-
def run(self, args):
'''Run the action selected
@@ -366,63 +365,6 @@ class CliBase(object):
'''
# establish our actions instance
self.actions = self.cli_config['Actions'](self.config, self.output_results, self.logger)
- # check for seed update
- from sslfetch.connections import Connector
- connector_output = {
- 'info': self.logger.info,
- 'debug': self.logger.debug,
- 'error': self.logger.error,
- 'exception': self.logger.exception,
- 'warning': self.warning_output,
- 'kwargs-info': {},
- 'kwargs-debug': {},
- 'kwargs-error': {},
- 'kwargs-exception': {},
- 'kwargs-warning': {},
- }
- fetcher = Connector(connector_output, None, "Gentoo Keys")
- successes = []
- up_to_date = True
- categories = list(self.config.defaults['seeds'])
- '''Attemp to download seed and seed.sig files for each available category'''
- for category in categories:
- filepath = self.config.defaults['seedsdir'] + "/" + category + ".seeds"
- timestamp_path = filepath + ".timestamp"
- url = self.config.defaults['seedurls'][category]
- success, signedfile, timestamp = fetcher.fetch_file(
- url, filepath, timestamp_path)
- if timestamp != "":
- up_to_date = False
- successes.append(success)
- url += ".sig"
- filepath += ".sig"
- success, signedfile, timestamp = fetcher.fetch_file(
- url, filepath, timestamp_path)
- if timestamp != "":
- up_to_date = False
- successes.append(success)
- if False not in successes and not up_to_date:
- print("Seeds need to be updated")
- ack = None
- while ack not in ("y", "yes", "n", "no"):
- ack = py_input("Would you like to update the seeds now? (y/n) ").lower()
- if ack in ("y", "yes"):
- custom_args = copy.copy(args)
- for attr in GKEY._fields:
- if attr != "debug":
- custom_args.attr = None
- custom_args.category = None
- custom_args.action = "update-seed"
- print("Updating seeds")
- self.run(custom_args)
- elif False not in successes:
- print("Seeds are up to date")
- else:
-<<<<<<< HEAD
- print("Seed update check failed, check your internet connection.")
-=======
- print("Seed update check failed, check your internet connection.")
->>>>>>> b9e64a9... gkeys actions: Added automatic seeds,keys update capability
# run the action
func = getattr(self.actions, '%s'
% self.cli_config['Action_Map'][args.action]['func'])
next reply other threads:[~2018-07-07 5:23 UTC|newest]
Thread overview: 144+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-07 5:23 Brian Dolbec [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-08-15 16:15 [gentoo-commits] proj/gentoo-keys:master commit in: gkeys/gkeys/ Brian Dolbec
2018-08-15 1:51 Brian Dolbec
2018-08-15 1:05 Brian Dolbec
2018-07-07 15:10 Brian Dolbec
2018-07-07 15:10 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2018-07-07 5:23 Brian Dolbec
2016-12-24 9:13 [gentoo-commits] proj/gentoo-keys:gsoc-2016 " Brian Dolbec
2016-12-24 0:38 ` [gentoo-commits] proj/gentoo-keys:master " Brian Dolbec
2016-12-24 9:13 [gentoo-commits] proj/gentoo-keys:gsoc-2016 " Brian Dolbec
2016-12-24 0:38 ` [gentoo-commits] proj/gentoo-keys:master " Brian Dolbec
2016-12-24 9:13 [gentoo-commits] proj/gentoo-keys:gsoc-2016 " Brian Dolbec
2016-10-27 18:41 ` [gentoo-commits] proj/gentoo-keys:master " Brian Dolbec
2016-12-24 9:13 [gentoo-commits] proj/gentoo-keys:gsoc-2016 " Brian Dolbec
2016-10-27 21:49 ` [gentoo-commits] proj/gentoo-keys:master " Brian Dolbec
2016-12-24 4:52 Brian Dolbec
2016-06-01 15:16 Brian Dolbec
2016-06-01 15:16 Brian Dolbec
2016-01-23 23:33 Brian Dolbec
2016-01-23 23:33 Brian Dolbec
2016-01-23 19:04 Brian Dolbec
2015-12-25 17:03 Brian Dolbec
2015-12-13 0:51 Brian Dolbec
2015-08-25 14:10 Brian Dolbec
2015-08-25 14:10 Brian Dolbec
2015-08-09 22:52 Brian Dolbec
2015-08-09 1:09 Brian Dolbec
2015-08-09 1:09 Brian Dolbec
2015-08-09 1:09 Brian Dolbec
2015-08-09 1:09 Brian Dolbec
2015-08-09 1:09 Brian Dolbec
2015-08-09 1:09 Brian Dolbec
2015-08-09 1:09 Brian Dolbec
2015-08-09 1:09 Brian Dolbec
2015-08-09 1:09 Brian Dolbec
2015-08-09 1:09 Brian Dolbec
2015-08-09 1:09 Brian Dolbec
2015-07-25 16:45 Brian Dolbec
2015-07-25 16:45 Brian Dolbec
2015-07-25 16:45 Brian Dolbec
2015-06-22 13:41 Brian Dolbec
2015-06-01 1:56 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-05-31 5:03 Brian Dolbec
2015-03-18 15:32 Brian Dolbec
2015-03-17 19:51 Brian Dolbec
2015-03-08 15:09 Brian Dolbec
2015-03-06 21:04 Brian Dolbec
2015-02-11 17:37 Brian Dolbec
2015-02-11 17:37 Brian Dolbec
2015-02-11 17:37 Brian Dolbec
2015-02-11 17:37 Brian Dolbec
2015-02-11 17:37 Brian Dolbec
2015-02-11 17:37 Brian Dolbec
2015-02-11 17:37 Brian Dolbec
2015-02-11 17:37 Brian Dolbec
2015-01-09 21:07 Brian Dolbec
2015-01-09 21:07 Brian Dolbec
2015-01-09 21:07 Brian Dolbec
2015-01-09 21:07 Brian Dolbec
2015-01-09 21:07 Brian Dolbec
2015-01-09 21:07 Brian Dolbec
2015-01-09 21:07 Brian Dolbec
2015-01-08 4:13 Brian Dolbec
2015-01-07 23:39 Brian Dolbec
2015-01-05 23:12 Brian Dolbec
2015-01-05 23:12 Brian Dolbec
2015-01-05 23:12 Brian Dolbec
2015-01-05 23:12 Brian Dolbec
2015-01-05 23:12 Brian Dolbec
2015-01-05 23:12 Brian Dolbec
2015-01-05 23:12 Brian Dolbec
2015-01-05 23:12 Brian Dolbec
2015-01-01 22:32 Brian Dolbec
2015-01-01 17:44 Brian Dolbec
2015-01-01 17:44 Brian Dolbec
2015-01-01 17:44 Brian Dolbec
2015-01-01 17:44 Brian Dolbec
2015-01-01 17:44 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-31 21:34 Brian Dolbec
2014-12-26 18:37 Brian Dolbec
2014-12-26 18:37 Brian Dolbec
2014-12-26 18:37 Brian Dolbec
2014-12-26 5:02 Brian Dolbec
2014-12-26 5:02 Brian Dolbec
2014-12-26 5:02 Brian Dolbec
2014-12-25 22:07 Brian Dolbec
2014-12-25 22:07 Brian Dolbec
2014-12-25 20:43 Brian Dolbec
2014-12-25 20:43 Brian Dolbec
2014-12-25 20:43 Brian Dolbec
2014-12-24 19:59 Brian Dolbec
2014-12-24 19:59 Brian Dolbec
2014-12-24 19:59 Brian Dolbec
2014-12-24 19:59 Brian Dolbec
2014-12-24 19:59 Brian Dolbec
2014-12-24 19:59 Brian Dolbec
2014-12-24 19:59 Brian Dolbec
2014-12-24 19:59 Brian Dolbec
2014-12-23 2:50 Brian Dolbec
2014-12-23 2:50 Brian Dolbec
2014-12-23 0:13 Brian Dolbec
2014-12-22 23:11 Brian Dolbec
2014-12-22 23:11 Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1530940930.5ac5f27889115cd48e89e910a3d12380367cccb6.dolsen@gentoo \
--to=dolsen@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox