From 4800b0651fb2e67fb39fa0bf98ccf0857644fd2c Mon Sep 17 00:00:00 2001 From: Bert IJff Date: Mon, 31 Mar 2014 13:35:04 +0200 Subject: [PATCH] Update cpsadduser.py Corrected call to create_user (added empty uuid parameter) Show more info on failing call --- conpaas-director/cpsadduser.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/conpaas-director/cpsadduser.py b/conpaas-director/cpsadduser.py index 566a816e..c8d7a1a1 100644 --- a/conpaas-director/cpsadduser.py +++ b/conpaas-director/cpsadduser.py @@ -38,9 +38,13 @@ password, p2 = pprompt() try: - create_user(username, "", "", email, "", password, credit) - except sqlalchemy.exc.IntegrityError: + create_user(username, "", "", email, "", password, credit, "") + # here we don't fill in: fname, lname, affiliation, uuid + except sqlalchemy.exc.IntegrityError as e: print "User %s already present" % username - + print "Statement: %s" % e.statement + print "Orig: %s" % e.orig + print "Params: %s" % json.dumps(e.params) + common.chown(common.config_parser.get('director', 'DATABASE_URI').replace('sqlite:///', ''), 'www-data', 'www-data')