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, 24 Dec 2016 04:52:40 +0000 (UTC) [thread overview] Message-ID: <1482555115.c1cf82a2f2f651da4749065be050154f23e07469.dolsen@gentoo> (raw) commit: c1cf82a2f2f651da4749065be050154f23e07469 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Sat Dec 24 04:51:55 2016 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Sat Dec 24 04:51:55 2016 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=c1cf82a2 gkeys actions: Migrate self.category setting to _set_category() gkeys/gkeys/actions.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py index 07dba7a..a9d2b69 100644 --- a/gkeys/gkeys/actions.py +++ b/gkeys/gkeys/actions.py @@ -108,6 +108,7 @@ class Actions(ActionBase): if args.uid is None: args.uid = [] gkey = self.seedhandler.new(args, checkgkey=True) + self._set_category(args.category) if not gkey: return (False, ["Failed to create a valid GKEY instance.", "Check for invalid data entries"]) @@ -198,7 +199,7 @@ class Actions(ActionBase): # fill in code here if not args.category: args.category = 'gentoo' - self.category = args.category + self._set_category(args.category) if args.keydir: self.gpg.set_keydir(args.keydir, "list-keys") self.gpg.set_keyseedfile() @@ -267,7 +268,7 @@ class Actions(ActionBase): return (False, ["Search failed for search term"]) # get confirmation # fill in code here - self.category = args.category + self._set_category(args.category) for gkey in gkeys: self.gpg.set_keydir(gkey.keydir, "recv-keys") self.gpg.set_keyseedfile() @@ -325,7 +326,7 @@ class Actions(ActionBase): return (False, [_unicode("Please specify seeds category.")]) self.logger.debug(_unicode("ACTIONS: checkkey; args: %s") % _unicode(args)) seeds = self.seedhandler.load_category(args.category) - self.category = args.category + self._set_category(args.category) results = {} failed = defaultdict(list) kwargs = self.seedhandler.build_gkeydict(args) @@ -375,7 +376,7 @@ class Actions(ActionBase): return (False, ["Please specify seeds category."]) self.logger.debug(_unicode("ACTIONS: speccheck; args: %s") % _unicode(args)) - self.category = args.category + self._set_category(args.category) catdir, keyresults = self.keyhandler.determine_keys(args) self.logger.debug(_unicode("ACTIONS: speccheck; catdir = %s") % catdir) results = {} @@ -524,6 +525,7 @@ class Actions(ActionBase): self.logger.debug(_unicode("ACTIONS: removekey; kwargs: %s") % _unicode(kwargs)) seeds = self.seedhandler.load_category(args.category) + self._set_category(args.category) messages = [] if args.nick == '*': self.output([''],_unicode('Remove All keys in category: %s') @@ -620,9 +622,9 @@ class Actions(ActionBase): '''Lists the installed key directories''' if args.category: keyring = self.config.get_key('keyring') - catdir = os.path.join(keyring, args.category) else: return (False, ["Please specify a category."]) + catdir = self._set_category(args.category) self.logger.debug("ACTIONS: installed; catdir = %s" % catdir) installed_keys = [] try: @@ -697,7 +699,7 @@ class Actions(ActionBase): def _verify(self, args, key, messages=None): if messages == None: messages = [] - self.category = args.category + self._set_category(args.category) filepath, signature = args.filename, args.signature timestamp_path = None isurl = success = verified = False @@ -831,9 +833,9 @@ class Actions(ActionBase): else: nicks = args.nick args.category = 'sign' + self._set_category(args.category) # load our installed signing keys db self.seeds = self.seedhandler.load_category('sign', nicks) - self.category = args.category if not self.seeds.seeds: return (False, ['No installed keys, try installkey action.', '']) keydir = self.config.get_key("sign", "keydir") @@ -877,7 +879,7 @@ class Actions(ActionBase): self.logger.debug(_unicode("ACTIONS: refreshkey; args: %s") % _unicode(args)) seeds = self.seedhandler.load_category(args.category, refresh=True) - self.category = args.category + self._set_category(args.category) results = {} kwargs = self.seedhandler.build_gkeydict(args) keyresults = seeds.list(**kwargs)
WARNING: multiple messages have this Message-ID (diff)
From: "Brian Dolbec" <dolsen@gentoo.org> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/gentoo-keys:gsoc-2016 commit in: gkeys/gkeys/ Date: Sat, 24 Dec 2016 09:13:16 +0000 (UTC) [thread overview] Message-ID: <1482555115.c1cf82a2f2f651da4749065be050154f23e07469.dolsen@gentoo> (raw) Message-ID: <20161224091316.Y6QPewh80oZqV3oyEeTNgMaWL4bLIaWrII05lS0U400@z> (raw) commit: c1cf82a2f2f651da4749065be050154f23e07469 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Sat Dec 24 04:51:55 2016 +0000 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> CommitDate: Sat Dec 24 04:51:55 2016 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=c1cf82a2 gkeys actions: Migrate self.category setting to _set_category() gkeys/gkeys/actions.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py index 07dba7a..a9d2b69 100644 --- a/gkeys/gkeys/actions.py +++ b/gkeys/gkeys/actions.py @@ -108,6 +108,7 @@ class Actions(ActionBase): if args.uid is None: args.uid = [] gkey = self.seedhandler.new(args, checkgkey=True) + self._set_category(args.category) if not gkey: return (False, ["Failed to create a valid GKEY instance.", "Check for invalid data entries"]) @@ -198,7 +199,7 @@ class Actions(ActionBase): # fill in code here if not args.category: args.category = 'gentoo' - self.category = args.category + self._set_category(args.category) if args.keydir: self.gpg.set_keydir(args.keydir, "list-keys") self.gpg.set_keyseedfile() @@ -267,7 +268,7 @@ class Actions(ActionBase): return (False, ["Search failed for search term"]) # get confirmation # fill in code here - self.category = args.category + self._set_category(args.category) for gkey in gkeys: self.gpg.set_keydir(gkey.keydir, "recv-keys") self.gpg.set_keyseedfile() @@ -325,7 +326,7 @@ class Actions(ActionBase): return (False, [_unicode("Please specify seeds category.")]) self.logger.debug(_unicode("ACTIONS: checkkey; args: %s") % _unicode(args)) seeds = self.seedhandler.load_category(args.category) - self.category = args.category + self._set_category(args.category) results = {} failed = defaultdict(list) kwargs = self.seedhandler.build_gkeydict(args) @@ -375,7 +376,7 @@ class Actions(ActionBase): return (False, ["Please specify seeds category."]) self.logger.debug(_unicode("ACTIONS: speccheck; args: %s") % _unicode(args)) - self.category = args.category + self._set_category(args.category) catdir, keyresults = self.keyhandler.determine_keys(args) self.logger.debug(_unicode("ACTIONS: speccheck; catdir = %s") % catdir) results = {} @@ -524,6 +525,7 @@ class Actions(ActionBase): self.logger.debug(_unicode("ACTIONS: removekey; kwargs: %s") % _unicode(kwargs)) seeds = self.seedhandler.load_category(args.category) + self._set_category(args.category) messages = [] if args.nick == '*': self.output([''],_unicode('Remove All keys in category: %s') @@ -620,9 +622,9 @@ class Actions(ActionBase): '''Lists the installed key directories''' if args.category: keyring = self.config.get_key('keyring') - catdir = os.path.join(keyring, args.category) else: return (False, ["Please specify a category."]) + catdir = self._set_category(args.category) self.logger.debug("ACTIONS: installed; catdir = %s" % catdir) installed_keys = [] try: @@ -697,7 +699,7 @@ class Actions(ActionBase): def _verify(self, args, key, messages=None): if messages == None: messages = [] - self.category = args.category + self._set_category(args.category) filepath, signature = args.filename, args.signature timestamp_path = None isurl = success = verified = False @@ -831,9 +833,9 @@ class Actions(ActionBase): else: nicks = args.nick args.category = 'sign' + self._set_category(args.category) # load our installed signing keys db self.seeds = self.seedhandler.load_category('sign', nicks) - self.category = args.category if not self.seeds.seeds: return (False, ['No installed keys, try installkey action.', '']) keydir = self.config.get_key("sign", "keydir") @@ -877,7 +879,7 @@ class Actions(ActionBase): self.logger.debug(_unicode("ACTIONS: refreshkey; args: %s") % _unicode(args)) seeds = self.seedhandler.load_category(args.category, refresh=True) - self.category = args.category + self._set_category(args.category) results = {} kwargs = self.seedhandler.build_gkeydict(args) keyresults = seeds.list(**kwargs)
next reply other threads:[~2016-12-24 4:52 UTC|newest] Thread overview: 145+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-12-24 4:52 Brian Dolbec [this message] 2016-12-24 9:13 ` [gentoo-commits] proj/gentoo-keys:gsoc-2016 commit in: gkeys/gkeys/ Brian Dolbec -- strict thread matches above, loose matches on Subject: below -- 2018-08-15 16:15 [gentoo-commits] proj/gentoo-keys:master " 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 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-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 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-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=1482555115.c1cf82a2f2f651da4749065be050154f23e07469.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: linkBe 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