From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 01727139897 for ; Tue, 25 Aug 2015 14:10:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B3A51E07EC; Tue, 25 Aug 2015 14:10:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 55D81E07EC for ; Tue, 25 Aug 2015 14:10:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7C1C4340906 for ; Tue, 25 Aug 2015 14:10:13 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F2AAA162 for ; Tue, 25 Aug 2015 14:10:08 +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: <1440511526.54c1719b1701ce9f4b5853b029a2e9bc9412db8e.dolsen@gentoo> Subject: [gentoo-commits] proj/gentoo-keys:master commit in: gkeys/gkeys/ X-VCS-Repository: proj/gentoo-keys X-VCS-Files: gkeys/gkeys/actionbase.py X-VCS-Directories: gkeys/gkeys/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 54c1719b1701ce9f4b5853b029a2e9bc9412db8e X-VCS-Branch: master Date: Tue, 25 Aug 2015 14:10:08 +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: 8cbc407e-8c11-4d6a-b759-84668581d2a2 X-Archives-Hash: 3e366754e87857fa5d379a67d891e7c0 commit: 54c1719b1701ce9f4b5853b029a2e9bc9412db8e Author: Brian Dolbec gentoo org> AuthorDate: Tue Aug 25 14:05:26 2015 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Tue Aug 25 14:05:26 2015 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=54c1719b actionbase.py: Fix sanity check in _set_category pyGPG changed, it now returns None for a key/subkey that it fails to find. Add a cat check as well. gkeys/gkeys/actionbase.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gkeys/gkeys/actionbase.py b/gkeys/gkeys/actionbase.py index e8d5ba4..c53bfdb 100644 --- a/gkeys/gkeys/actionbase.py +++ b/gkeys/gkeys/actionbase.py @@ -80,7 +80,9 @@ class ActionBase(object): def _set_category(self, cat): keyring = self.config.get_key('keyring') - if "foo-bar'd" in keyring: + if not keyring: + raise + if not cat: raise self.category = cat catdir = os.path.join(keyring, cat)