Commit 5ad49b57 authored by Julien Muchembled's avatar Julien Muchembled

vm: allow repetition of characters in generated passwords

parent b275ec90
......@@ -13,7 +13,8 @@ from zc.buildout.rmtree import rmtree as buildout_rmtree
def generatePassword(length=8):
from random import SystemRandom
from string import ascii_lowercase
return ''.join(SystemRandom().sample(ascii_lowercase, length))
choice = SystemRandom().choice
return ''.join(choice(ascii_lowercase) for _ in range(length))
def is_true(value, default=False):
return default if value is None else ('false', 'true').index(value)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment