From a66c980cc6d997076968c3e357eef80cd3f7cbb8 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Sat, 22 Jun 2013 18:19:23 -0700 Subject: [PATCH] strip errant line feeds in ldap values --- gkeyldap/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gkeyldap/cli.py b/gkeyldap/cli.py index 06da0f3..0527689 100644 --- a/gkeyldap/cli.py +++ b/gkeyldap/cli.py @@ -245,8 +245,10 @@ class Main(object): continue try: values = info[field] + # strip errant line feeds + values = [x.strip('\n') for x in values] if values and field in ['uid', 'cn' ]: - value = values[0] + value = values[0].strip('\n') # separate out short/long key id's elif values and x in ['keyid', 'longkeyid']: value = get_key_ids(x, values) -- 2.26.2