From: Scott Baker Date: Fri, 14 Nov 2008 18:31:14 +0000 (+0000) Subject: support for users with a period in their names X-Git-Tag: sfa-0.9-0@14641~808 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=1915007fd51bca24290c85b355259898871dfb16 support for users with a period in their names --- diff --git a/plc/import.py b/plc/import.py index 122c76fe..ce43c442 100644 --- a/plc/import.py +++ b/plc/import.py @@ -104,10 +104,16 @@ def get_pl_pubkey(key_id): else: return None -def import_person(parent_hrn, person): +def person_to_hrn(parent_hrn, person): personname = person['last_name'] + "_" + person['first_name'] - + personname = personname.replace(" ", "_") + personname = personname.replace(".", "_") hrn = parent_hrn + "." + personname + return hrn + +def import_person(parent_hrn, person): + hrn = person_to_hrn(parent_hrn, person) + report.trace("Import: importing person " + hrn) table = get_auth_table(parent_hrn)