X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fplanetlab%2Fplslices.py;h=73f2bc170c21609fa92968db1922e03fe02c9c7a;hb=d47e501b3a2fbf0261c9794063fd6712c949036f;hp=46dbb23b370d1db888b1850e4a049185fabeca2a;hpb=3281c08478620cdb42a0d763d960de86a360382c;p=sfa.git diff --git a/sfa/planetlab/plslices.py b/sfa/planetlab/plslices.py index 46dbb23b..73f2bc17 100644 --- a/sfa/planetlab/plslices.py +++ b/sfa/planetlab/plslices.py @@ -440,14 +440,16 @@ class PlSlices: # so we first try with the accurate email person_id = int (self.driver.shell.AddPerson(person_record)) except: + # and if that fails we start again with the email based on the hrn, which this time is unique.. person_record['email']=default_email logger.debug ("second chance with email=%s"%person_record['email']) - # and if that fails we start again with the email based on the hrn, which this time is unique.. person_id = int (self.driver.shell.AddPerson(person_record)) self.driver.shell.AddRoleToPerson('user', person_id) self.driver.shell.AddPersonToSite(person_id, site_id) # plcapi tends to mess with the incoming hrn so let's make sure self.driver.shell.SetPersonHrn (person_id, user_hrn) + # also 'enabled':True does not seem to pass through with AddPerson + self.driver.shell.UpdatePerson (person_id, {'enabled': True}) return person_id