Minor post-merge fixes

This commit is contained in:
Todd Willey
2010-07-16 22:42:40 +00:00
committed by Tarmac

View File

@@ -459,11 +459,11 @@ class UserManager(object):
description=None, member_users=None):
if member_users:
member_users = [User.safe_id(u) for u in member_users]
with LDAPWrapper() as conn:
# NOTE(vish): try to associate a vpn ip and port first because
# if it throws an exception, we save having to
# create and destroy a project
Vpn.create(name)
with LDAPWrapper() as conn:
return conn.create_project(name,
User.safe_id(manager_user),
description,
@@ -530,6 +530,7 @@ class UserManager(object):
try:
conn.create_project(user, user, user)
except Exception:
with LDAPWrapper() as conn:
conn.delete_user(user)
raise
return result