Check the return value and bail if the user creation was a failure.
For large updates, one can use --create and --push to update barcodes
for users who already exist.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
dump_data(result_data)
if ARGS.create_users:
res = create_evergreen_user(auth, user)
- update_ldap_barcode(con, user)
+ if res:
+ update_ldap_barcode(con, user)
if ARGS.push_barcode:
try:
uid = find_evergreen_user(auth, user)
create_stat_cats(newau, user)
print("Created: %s with barcode %s" % (newau.usrname(), user.barcode))
+ return user.barcode
def update_ldap_barcode(con, user):
"""