diff options
| author | Yuriy Taraday <yorik.sar@gmail.com> | 2011-06-29 14:07:59 +0400 |
|---|---|---|
| committer | Yuriy Taraday <yorik.sar@gmail.com> | 2011-06-29 14:07:59 +0400 |
| commit | c8d27dd68d449df77106c9cdf45b63c25fcb18ca (patch) | |
| tree | 606ed503f6586c3d77aac31df49c3b8b13855229 | |
| parent | 90556a857d0c3187115f401a637cd4ae1134ce05 (diff) | |
Brought back that encode under condition.
| -rw-r--r-- | nova/compute/api.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 16ae07272..aa62e72cd 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -65,6 +65,8 @@ def generate_default_hostname(instance): else: table += '\0' deletions += c + if isinstance(display_name, unicode): + display_name = display_name.encode('latin-1', 'ignore') return display_name.translate(table, deletions) |
