Commit c724b03e 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 3bff3daf
......@@ -30,7 +30,7 @@ import unittest
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from erp5.component.tool.SessionTool import SESSION_CACHE_FACTORY
from string import letters as LETTERS
from string import ascii_letters as LETTERS
from random import choice
import time
......
......@@ -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