summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkpov_util.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kpov_util.py b/kpov_util.py
index 4acaf79..6a667bf 100755
--- a/kpov_util.py
+++ b/kpov_util.py
@@ -42,11 +42,11 @@ def ssh_test(host, user, password, commands=()):
# omit i, l, o, I, O, 1, 0 for readability
uppers = 'ABCDEFGHJKLMNPQRSTUVWXYZ'
lowers = 'abcdefghjkmnpqrstuvwxyz'
-numbers = '23456789'
-def alnum_gen(r, length=1, lower=True, upper=True):
+digits = '23456789'
+def alnum_gen(r, length=1, digit=True, lower=True, upper=True):
return ''.join(
r.choice(
- numbers +
+ (digits if digit else '') +
(lowers if lower else '') +
(uppers if upper else ''))
for i in range(length))