Merge pull request #12579 from cvrebert/patch-1

fix typo in modules.lxc._rand_cpu_str()
This commit is contained in:
Pedro Algarvio 2014-05-06 23:48:15 +01:00
commit 3a907e725d

View File

@ -104,7 +104,7 @@ def _rand_cpu_str(cpu):
return '0-{0}'.format(avail)
to_set = set()
while len(to_set) < cpu:
choice = random.radint(0, avail - 1)
choice = random.randint(0, avail - 1)
if choice not in to_set:
to_set.add(str(choice))
return ','.join(sorted(to_set))