diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-02-10 17:17:48 +0000 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-02-10 17:17:48 +0000 |
commit | c8e75ddf808f4ac017f609bafc101648b7568935 (patch) | |
tree | d06abb34818ff75ce9d99042f606640e5a7c392a /cloudinit | |
parent | 7e1edaa2045f6a964f111c720b2b73972746baa8 (diff) | |
download | vyos-cloud-init-c8e75ddf808f4ac017f609bafc101648b7568935.tar.gz vyos-cloud-init-c8e75ddf808f4ac017f609bafc101648b7568935.zip |
fix use of 'letters' and translate
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/config/cc_set_passwords.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/config/cc_set_passwords.py b/cloudinit/config/cc_set_passwords.py index 4ca85e21..8b705d90 100644 --- a/cloudinit/config/cc_set_passwords.py +++ b/cloudinit/config/cc_set_passwords.py @@ -28,11 +28,11 @@ from cloudinit import distros as ds from cloudinit import ssh_util from cloudinit import util -from string import letters, digits +from string import ascii_letters, digits # We are removing certain 'painful' letters/numbers -PW_SET = (letters.translate(None, 'loLOI') + - digits.translate(None, '01')) +PW_SET = (''.join([x for x in ascii_letters + digits + if x not in 'loLOI01'])) def handle(_name, cfg, cloud, log, args): |