From 4fb65a94659e77a4d5ca721bfe571d30d017bf45 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Sat, 22 Jun 2013 18:11:19 +0000 Subject: [PATCH] Add error output for missing data, comment out a debug statement Error for 'undefined' in values obtained from ldap --- gkeyldap/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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" -- 2.26.2