summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@yahoo.com>2010-10-25 17:20:10 -0700
committerVishvananda Ishaya <vishvananda@yahoo.com>2010-10-25 17:20:10 -0700
commit8ccdae97558d9660a9a0fac8dad809a09cbd3c71 (patch)
tree396ec60d46f2db1e6e140339e3a6a972c6728bf6
parent5318bf110019d820e6f000662194d6e29f3e315f (diff)
downloadnova-8ccdae97558d9660a9a0fac8dad809a09cbd3c71.tar.gz
nova-8ccdae97558d9660a9a0fac8dad809a09cbd3c71.tar.xz
nova-8ccdae97558d9660a9a0fac8dad809a09cbd3c71.zip
actually remove the conditional
-rw-r--r--nova/utils.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/nova/utils.py b/nova/utils.py
index 7683fc9f4..7f6311209 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -131,13 +131,9 @@ def runthis(prompt, cmd, check_exit_code=True):
def generate_uid(topic, size=8):
- if topic == "i":
- # Instances have integer internal ids.
- return random.randint(0, 2 ** 32 - 1)
- else:
- characters = '01234567890abcdefghijklmnopqrstuvwxyz'
- choices = [random.choice(characters) for x in xrange(size)]
- return '%s-%s' % (topic, ''.join(choices))
+ characters = '01234567890abcdefghijklmnopqrstuvwxyz'
+ choices = [random.choice(characters) for x in xrange(size)]
+ return '%s-%s' % (topic, ''.join(choices))
def generate_mac():