From 4df46a413a1c3ea3b5354fd88491d9484d9cc07c Mon Sep 17 00:00:00 2001 From: Ian Main Date: Thu, 28 Feb 2013 23:30:59 -0500 Subject: [PATCH] Only split roles if they are not None. Change-Id: I2fbfbd6f6b1c898f7032744f9411821d5d97048c Signed-off-by: Ian Main Fixes: bug #1136891 --- heat/common/context.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/heat/common/context.py b/heat/common/context.py index 80332c8c..8c28b897 100644 --- a/heat/common/context.py +++ b/heat/common/context.py @@ -186,7 +186,10 @@ class ContextMiddleware(wsgi.Middleware): tenant = headers.get('X-Tenant-Name') tenant_id = headers.get('X-Tenant-Id') auth_url = headers.get('X-Auth-Url') - roles = headers.get('X-Roles').split(',') + roles = headers.get('X-Roles') + if roles is not None: + roles = roles.split(',') + except Exception: raise exception.NotAuthenticated() -- 2.45.2