summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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):