diff options
author | Seyeong Kim <seyeong.kim@canonical.com> | 2018-04-05 15:10:01 -0700 |
---|---|---|
committer | Seyeong Kim <seyeong.kim@canonical.com> | 2018-04-06 04:41:49 -0700 |
commit | 4d71926b3afc50c3f16378de260b86a85e8d721d (patch) | |
tree | 8b11cafc39c8373346d4ccec9d1b1952b231d807 /heat/common | |
parent | a09bce8c5ebbda67344d53d7f53f25f5a7455375 (diff) | |
download | heat-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.py | 4 |
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, |