From: Brian Dolbec Date: Sat, 16 Nov 2013 19:51:29 +0000 (-0800) Subject: Move KEY_LEN to config. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c308f253c89740eca7e792b4cd78dc9cb43f7151;p=gentoo-keys.git Move KEY_LEN to config. --- diff --git a/gkeyldap/actions.py b/gkeyldap/actions.py index 13e67f7..2c65a90 100644 --- a/gkeyldap/actions.py +++ b/gkeyldap/actions.py @@ -13,18 +13,11 @@ import os import re -from gkeys.config import GKEY, KEYID, LONGKEYID, FINGERPRINT +from gkeys.config import GKEY, KEYID, LONGKEYID, FINGERPRINT, KEY_LEN from gkeys.seed import Seeds from gkeyldap.search import (LdapSearch, UID, gkey2ldap_map, gkey2SEARCH) -# set some defaults -KEY_LEN = { - 'keyid': 8, - 'longkeyid': 16, -} - - Avialable_Actions = ['ldapsearch', 'updateseeds'] @@ -187,9 +180,9 @@ class Actions(object): keyinfo = [] keyid_found = False keyid_missing = False - # assume it's good until found an error is found + # assume it's good until an error is found is_good = True - #self.logger.debug("MAIN: build_gkeylist; info = %s" % str(info)) + #self.logger.debug("Actions: build_gkeylist; info = %s" % str(info)) for x in GKEY._fields: field = gkey2ldap_map[x] if not field: diff --git a/gkeys/config.py b/gkeys/config.py index 5fe3871..6785c7b 100644 --- a/gkeys/config.py +++ b/gkeys/config.py @@ -120,6 +120,12 @@ LONGKEYID = 3 KEYDIR = 4 FINGERPRINT = 5 +# set some defaults +KEY_LEN = { + 'keyid': 8, + 'longkeyid': 16, +} + class GKEY(namedtuple('GKEY', ['nick', 'name', 'keyid', 'longkeyid', 'keydir', 'fingerprint'])):