def person_update(name, req_phys_confirmation, no_phys_confirmation, location_windows): pm = PersonManager() if req_phys_confirmation: req_phys = True elif no_phys_confirmation: req_phys = False else: req_phys = None pm.update_person(Name=name, RequirePhysicalConfirmation=req_phys, Windows=location_windows)
def person_update(name, req_phys_confirmation, no_phys_confirmation, location_windows): pm = PersonManager() if req_phys_confirmation: req_phys = True elif no_phys_confirmation: req_phys = False else: req_phys = None try: pm.update_person(Name=name, RequirePhysicalConfirmation=req_phys, Windows=location_windows) except Exception as e: print "Error creating user: {}".format(e) click.echo("Upserted user {}".format(name))