diff options
| author | Thierry Carrez <thierry@openstack.org> | 2011-08-24 18:01:29 +0200 |
|---|---|---|
| committer | Thierry Carrez <thierry@openstack.org> | 2011-08-24 18:01:29 +0200 |
| commit | 326268b9bf5d958263b70c64ca2ed21deac1a14e (patch) | |
| tree | bd08c125eb77b298d4db79e5756300d09f9b6136 | |
| parent | 8191cd38b2030a9d8816bcc21bd0cbc0119a7d91 (diff) | |
Let's be more elegant
| -rw-r--r-- | nova/compute/api.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py index 88ba81018..be1dbdd51 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -62,7 +62,7 @@ def generate_default_hostname(instance): c = chr(i) if ('a' <= c <= 'z') or ('0' <= c <= '9') or (c == '-'): table += c - elif (c == ' ') or (c == '_'): + elif c in " _": table += '-' elif ('A' <= c <= 'Z'): table += c.lower() |
