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 F0B82138334 for ; Sat, 7 Jul 2018 05:23:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1125AE0A6A; Sat, 7 Jul 2018 05:23:54 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id AE9C5E09F6 for ; Sat, 7 Jul 2018 05:23:53 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 89F13335C89 for ; Sat, 7 Jul 2018 05:23:51 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D1F982E2 for ; Sat, 7 Jul 2018 05:23:49 +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: <1530940930.5ac5f27889115cd48e89e910a3d12380367cccb6.dolsen@gentoo> Subject: [gentoo-commits] proj/gentoo-keys:master 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: 5ac5f27889115cd48e89e910a3d12380367cccb6 X-VCS-Branch: master Date: Sat, 7 Jul 2018 05:23:49 +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: 73149968-1bb6-4618-a380-d6921d6c48b4 X-Archives-Hash: b269ee160423c2ed5c042dcba16c7776 commit: 5ac5f27889115cd48e89e910a3d12380367cccb6 Author: Brian Dolbec gentoo org> AuthorDate: Sat Dec 24 09:11:08 2016 +0000 Commit: Brian Dolbec gentoo 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'])