commit: b98bb5be852b3a5a5bcf52830a51a653c9ab20e5 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 Dec 24 09:11:08 2016 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=b98bb5be
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 | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/gkeys/gkeys/base.py b/gkeys/gkeys/base.py index 28dd0b2..fb4465f 100644 --- a/gkeys/gkeys/base.py +++ b/gkeys/gkeys/base.py @@ -358,14 +358,7 @@ class CliBase(object): return False return True - - def run(self, args): - '''Run the action selected - - @param args: list of argumanets to parse - ''' - # establish our actions instance - self.actions = self.cli_config['Actions'](self.config, self.output_results, self.logger) + def _upadate_seeds(self): # check for seed update from sslfetch.connections import Connector connector_output = { @@ -390,14 +383,14 @@ class CliBase(object): timestamp_path = filepath + ".timestamp" url = self.config.defaults['seedurls'][category] success, signedfile, timestamp = fetcher.fetch_file( - url, filepath, timestamp_path) + url, filepath, timestamp_path, climit=0) if timestamp != "": up_to_date = False successes.append(success) url += ".sig" filepath += ".sig" success, signedfile, timestamp = fetcher.fetch_file( - url, filepath, timestamp_path) + url, filepath, timestamp_path, climit=0) if timestamp != "": up_to_date = False successes.append(success) @@ -419,6 +412,15 @@ class CliBase(object): print("Seeds are up to date") else: print("Seed update check failed, check your internet connection.") + + + def run(self, args): + '''Run the action selected + + @param args: list of argumanets to parse + ''' + # establish our actions instance + self.actions = self.cli_config['Actions'](self.config, self.output_results, self.logger) # run the action func = getattr(self.actions, '%s' % self.cli_config['Action_Map'][args.action]['func'])