summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2011-04-05 15:58:19 -0700
committerVishvananda Ishaya <vishvananda@gmail.com>2011-04-05 15:58:19 -0700
commit36857e5091234940e3ac68d154c019fbd5d28af5 (patch)
tree367aee16d9c5101a23f2128388f54785a8091d61
parent4a8a08790803d574ecd1dce4b3765cbce7e1043a (diff)
downloadnova-36857e5091234940e3ac68d154c019fbd5d28af5.tar.gz
nova-36857e5091234940e3ac68d154c019fbd5d28af5.tar.xz
nova-36857e5091234940e3ac68d154c019fbd5d28af5.zip
remove -None for user roles
-rw-r--r--nova/auth/manager.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/auth/manager.py b/nova/auth/manager.py
index f2451702c..3de2ceffe 100644
--- a/nova/auth/manager.py
+++ b/nova/auth/manager.py
@@ -368,8 +368,10 @@ class AuthManager(object):
return True
def _build_mc_key(self, user, role, project=None):
- return str("rolecache-%s-%s-%s" % (User.safe_id(user), role,
- (Project.safe_id(project) if project else 'None')))
+ role_key = str("rolecache-%s-%s" % (User.safe_id(user), role))
+ if project:
+ return "%s-%s" % (role_key, Project.safe_id(project))
+ return role_key
def _clear_mc_key(self, user, role, project=None):
# NOTE(anthony): it would be better to delete the key