From 3c566d839c1f5c812c0a1969bc9d9b3650bbcc11 Mon Sep 17 00:00:00 2001 From: Alex Dehnert Date: Mon, 8 Feb 2010 00:16:57 -0500 Subject: [PATCH] More functional card-access script --- card-access | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/card-access b/card-access index 98cb2e9..2362720 100755 --- a/card-access +++ b/card-access @@ -31,7 +31,7 @@ def get_ldap_data(username, fields): def get_data_dict(line_dict): email = line_dict['email'] - username = email.replace('@mit.edu', '').lower() + username = email.lower().replace('@mit.edu', '') ldap = get_ldap_data(username, [ 'cn' , 'sn' , 'givenName' ]) first = ldap['givenName'].replace(' ', '_').upper() last = ldap['sn'].replace(' ', '_').upper() @@ -54,7 +54,7 @@ def do_produce_card_info(db = sys.stdin): for line in reader: line_dict = dictize_line(header, line) - #print line_dict + print line_dict lines.append(format_line(get_data_dict(line_dict))) print '\n'.join(lines) -- 2.34.1