From: Ian Main Date: Fri, 1 Mar 2013 04:30:59 +0000 (-0500) Subject: Only split roles if they are not None. X-Git-Tag: 2014.1~768 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=4df46a413a1c3ea3b5354fd88491d9484d9cc07c;p=openstack-build%2Fheat-build.git Only split roles if they are not None. Change-Id: I2fbfbd6f6b1c898f7032744f9411821d5d97048c Signed-off-by: Ian Main Fixes: bug #1136891 --- 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()