summaryrefslogtreecommitdiff
path: root/heat/common
diff options
context:
space:
mode:
authorSeyeong Kim <seyeong.kim@canonical.com>2018-04-05 15:10:01 -0700
committerSeyeong Kim <seyeong.kim@canonical.com>2018-04-06 04:41:49 -0700
commit4d71926b3afc50c3f16378de260b86a85e8d721d (patch)
tree8b11cafc39c8373346d4ccec9d1b1952b231d807 /heat/common
parenta09bce8c5ebbda67344d53d7f53f25f5a7455375 (diff)
downloadheat-4d71926b3afc50c3f16378de260b86a85e8d721d.tar.gz
Fixing unicode issue when to_dict is called on py2.7 env
When using non-unicode old style user id such as Gāo Unicode error popup on py2.7 environment Fixing it on common/context.py Change-Id: I95e49f359410049ff5b254cd1b8ee16402c8719d Closes-Bug: #1761629
Diffstat (limited to 'heat/common')
-rw-r--r--heat/common/context.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/heat/common/context.py b/heat/common/context.py
index 974ee815f..ad89c83f6 100644
--- a/heat/common/context.py
+++ b/heat/common/context.py
@@ -156,8 +156,8 @@ class RequestContext(context.RequestContext):
return self._clients
def to_dict(self):
- user_idt = '{user} {tenant}'.format(user=self.user_id or '-',
- tenant=self.tenant_id or '-')
+ user_idt = u'{user} {tenant}'.format(user=self.user_id or '-',
+ tenant=self.tenant_id or '-')
return {'auth_token': self.auth_token,
'username': self.username,