Support Python 3 using six
This commit is contained in:
parent
d653a3a3f7
commit
eedb4c4b73
67 changed files with 455 additions and 255 deletions
|
|
@ -1,10 +1,11 @@
|
|||
from __future__ import unicode_literals
|
||||
import random
|
||||
import string
|
||||
import six
|
||||
|
||||
|
||||
def random_resource_id():
|
||||
size = 20
|
||||
chars = range(10) + list(string.lowercase)
|
||||
chars = list(range(10)) + list(string.ascii_lowercase)
|
||||
|
||||
return ''.join(unicode(random.choice(chars)) for x in range(size))
|
||||
return ''.join(six.text_type(random.choice(chars)) for x in range(size))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue