Commit 4c6906dc authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Arnaud Fontaine

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

parent 32e0ed5a
......@@ -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