Commit a7b6d28c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

fixup! py2/py3: string.letters is locale-dependent and removed in Python 3.

parent 2bd8a98b
......@@ -3,11 +3,11 @@
"""
from random import choice
from string import letters, digits
from string import ascii_letters, digits
character_set = ''
if include_letters:
character_set = '%s%s' %(character_set, letters)
character_set = '%s%s' %(character_set, ascii_letters)
if include_digits:
character_set = '%s%s' %(character_set, digits)
return ''.join([choice(character_set) for _ in range(int(string_length))])
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