From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A2BB5139085 for ; Sat, 24 Dec 2016 09:13:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6951B2340F3; Sat, 24 Dec 2016 09:13:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4A92E2340F3 for ; Sat, 24 Dec 2016 09:13:31 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E0CB43413B7 for ; Sat, 24 Dec 2016 09:13:20 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2E7D324FB for ; Sat, 24 Dec 2016 09:13:17 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1482570668.b98bb5be852b3a5a5bcf52830a51a653c9ab20e5.dolsen@gentoo> Subject: [gentoo-commits] proj/gentoo-keys:gsoc-2016 commit in: gkeys/gkeys/ X-VCS-Repository: proj/gentoo-keys X-VCS-Files: gkeys/gkeys/base.py X-VCS-Directories: gkeys/gkeys/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: b98bb5be852b3a5a5bcf52830a51a653c9ab20e5 X-VCS-Branch: gsoc-2016 Date: Sat, 24 Dec 2016 09:13:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 2df8bd17-0561-48a9-ac34-f0efe7501cee X-Archives-Hash: 0f5f9615bf2ace2ad0ae3db55f983a1a commit: b98bb5be852b3a5a5bcf52830a51a653c9ab20e5 Author: Brian Dolbec gentoo org> AuthorDate: Sat Dec 24 09:11:08 2016 +0000 Commit: Brian Dolbec gentoo 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'])