Commits

James Mills  committed a4f1684

Fixed letters sets in

  • Participants
  • Parent commits 4f3476a

Comments (0)

Files changed (1)

File pymills/utils.py

 
     seed(time())
 
-    letters = string.letters.strip("oO")
+    lowercase = string.lowercase.translate(None, "o")
+    uppercase = string.uppercase.translate(None, "O")
+    letters = "{0:s}{1:s}".format(lowercase, uppercase)
 
     password = list(
         chain(
+            (choice(uppercase) for _ in range(upper)),
+            (choice(lowercase) for _ in range(lower)),
             (choice(string.digits) for _ in range(digits)),
-            (choice(string.uppercase) for _ in range(upper)),
-            (choice(string.lowercase) for _ in range(lower)),
             (choice(letters) for _ in range((length - digits - upper - lower)))
         )
     )