From: Brian Dolbec Date: Sat, 22 Jun 2013 18:11:19 +0000 (+0000) Subject: Add error output for missing data, comment out a debug statement X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4fb65a94659e77a4d5ca721bfe571d30d017bf45;p=gentoo-keys.git Add error output for missing data, comment out a debug statement Error for 'undefined' in values obtained from ldap --- diff --git a/gkeyldap/cli.py b/gkeyldap/cli.py index 15e410e..d4971d0 100644 --- a/gkeyldap/cli.py +++ b/gkeyldap/cli.py @@ -194,7 +194,7 @@ class Main(object): @staticmethod def build_gkeylist(info): keyinfo = [] - logger.debug("build_gkeylist, info = %s" % str(info)) + #logger.debug("build_gkeylist, info = %s" % str(info)) for x in GKEY._fields: field = gkey2ldap_map[x] if not field: @@ -206,6 +206,9 @@ class Main(object): value = values[0] else: value = values + if 'undefined' in values: + logger.error('%s = "undefined" for %s, %s' + %(field, info['uid'][0], info['cn'][0])) keyinfo.append(value) except KeyError: logger.error("Missing %s for %s, %s"