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 2EFC71381F3 for ; Sun, 23 Jun 2013 07:14:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C4AA1E09BA; Sun, 23 Jun 2013 07:13:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0C439E09BA for ; Sun, 23 Jun 2013 07:13:57 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EA4F733E643 for ; Sun, 23 Jun 2013 07:13:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 8A4B4E5461 for ; Sun, 23 Jun 2013 07:13:55 +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: <1371865242.c418a8193a4efa791654fb2027195977a49cc6f8.dol-sen@gentoo> Subject: [gentoo-commits] proj/gentoo-keys:master commit in: gkeys/ X-VCS-Repository: proj/gentoo-keys X-VCS-Files: gkeys/config.py X-VCS-Directories: gkeys/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: c418a8193a4efa791654fb2027195977a49cc6f8 X-VCS-Branch: master Date: Sun, 23 Jun 2013 07:13:55 +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: 851396ec-cce6-4378-9e11-d505bf340882 X-Archives-Hash: 820cc3e225849ea10e2a972b1c2cf54e commit: c418a8193a4efa791654fb2027195977a49cc6f8 Author: Brian Dolbec gentoo org> AuthorDate: Sat Jun 22 01:40:42 2013 +0000 Commit: Brian Dolbec gmail com> CommitDate: Sat Jun 22 01:40:42 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-keys.git;a=commit;h=c418a819 Add nick field to GKEY class --- gkeys/config.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gkeys/config.py b/gkeys/config.py index 1daca70..3da1c21 100644 --- a/gkeys/config.py +++ b/gkeys/config.py @@ -17,6 +17,7 @@ from collections import namedtuple from pygpg.config import GPGConfig +from gkeys.log import logger from gkeys.utils import path @@ -74,7 +75,7 @@ class GKeysConfig(GPGConfig): self.configparser.read(defaults['config']) - def get_key(self, key): + def get_key(self, key, subkey=None): return self._get_(key) @@ -89,8 +90,8 @@ class GKeysConfig(GPGConfig): return None -class GKEY(namedtuple('GKEY', ['name', 'keyid', 'longkeyid', - 'fingerprint', 'keyring'])): +class GKEY(namedtuple('GKEY', ['nick', 'name', 'keyid', 'longkeyid', + 'keyring', 'fingerprint'])): '''Class to hold the relavent info about a key''' __slots__ = () @@ -102,7 +103,7 @@ class GKEY(namedtuple('GKEY', ['name', 'keyid', 'longkeyid', v.append(getattr(self, f)) return v - def value_string(self): + def value_string(self, separator=' '): '''Returns a space separated string of the field values''' - return ' '.join([str(x) for x in self.values()]) + return separator.join([str(x) for x in self.values()])