Remove string.lowercase usage
Python 3 has no `lowercase` in string module, so we should use `ascii_lowercase` instead of it. Related to blueprint make-python3-compatible Change-Id: I8407db72fc37c14d189698c1d51b1d9b45769760
This commit is contained in:
parent
8d3b5a0b2d
commit
47083eb909
|
@ -35,7 +35,8 @@ def _gen_credentials(*names):
|
|||
"""Generate credentials."""
|
||||
auth_dict = {}
|
||||
for name in names:
|
||||
val = ''.join(random.choice(string.lowercase) for i in moves.range(10))
|
||||
val = ''.join(random.choice(string.ascii_lowercase)
|
||||
for i in moves.range(10))
|
||||
auth_dict[name] = val
|
||||
return auth_dict
|
||||
|
||||
|
|
Loading…
Reference in New Issue