Skip to content
Snippets Groups Projects
Commit 16e24b6a authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Make error message more verbose

parent 01b02a09
No related branches found
No related tags found
2 merge requests!23Feat resolve uid gid,!18Redesign RabbitMQ
......@@ -20,7 +20,8 @@ def ohpc_account_create(ch, method, properties, body):
print("[{}]: User {} has been added".format(task, username))
success = True
except:
print("Failed to create user")
e = sys.exc_info()[0]
print("[{}]: Error: {}".format(task, e))
ch.basic_ack(delivery_tag=method.delivery_tag)
msg['uid'] = getpwnam(username).pw_uid
......
......@@ -22,7 +22,8 @@ def ood_account_create(ch, method, properties, body):
print("[{}]: User {} has been added".format(task, username))
success = True
except:
print("Failed to create user")
e = sys.exc_info()[0]
print("[{}]: Error: {}".format(task, e))
ch.basic_ack(delivery_tag=method.delivery_tag)
......
......@@ -20,8 +20,9 @@ def slurm_account_create(ch, method, properties, body):
print("SLURM account for user {} has been added".format(username))
success = True
except:
print("Failed to create user")
e = sys.exc_info()[0]
print("[{}]: Error: {}".format(task, e))
ch.basic_ack(delivery_tag=method.delivery_tag)
# send confirm message
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment