summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_set_passwords.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-02-10 17:17:48 +0000
committerScott Moser <smoser@ubuntu.com>2015-02-10 17:17:48 +0000
commitc8e75ddf808f4ac017f609bafc101648b7568935 (patch)
treed06abb34818ff75ce9d99042f606640e5a7c392a /cloudinit/config/cc_set_passwords.py
parent7e1edaa2045f6a964f111c720b2b73972746baa8 (diff)
downloadvyos-cloud-init-c8e75ddf808f4ac017f609bafc101648b7568935.tar.gz
vyos-cloud-init-c8e75ddf808f4ac017f609bafc101648b7568935.zip
fix use of 'letters' and translate
Diffstat (limited to 'cloudinit/config/cc_set_passwords.py')
-rw-r--r--cloudinit/config/cc_set_passwords.py6
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):