summaryrefslogtreecommitdiffstats
path: root/users.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-11-08 22:34:26 +0000
committerJeremy Katz <katzj@redhat.com>2004-11-08 22:34:26 +0000
commite8c0182d883ffed5a71df9d8f8276bc85f50727c (patch)
treea96d08f5ec064093e41337b9255ebf4c9e36e344 /users.py
parent2ed8ea7d718f6091c39a8a504a56dae63826537e (diff)
downloadanaconda-e8c0182d883ffed5a71df9d8f8276bc85f50727c.tar.gz
anaconda-e8c0182d883ffed5a71df9d8f8276bc85f50727c.tar.xz
anaconda-e8c0182d883ffed5a71df9d8f8276bc85f50727c.zip
2004-11-08 Jeremy Katz <katzj@redhat.com>
* users.py: whrandom is deprecated, use random instead
Diffstat (limited to 'users.py')
-rw-r--r--users.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/users.py b/users.py
index 11ad49933..05d5a406c 100644
--- a/users.py
+++ b/users.py
@@ -15,7 +15,7 @@
#
import iutil
-import whrandom
+import random
import crypt
import os
import string
@@ -79,10 +79,10 @@ class Password:
self.crypt = password
self.pure = None
else:
- salt = (whrandom.choice (string.letters +
- string.digits + './') +
- whrandom.choice (string.letters +
- string.digits + './'))
+ salt = (random.choice (string.letters +
+ string.digits + './') +
+ random.choice (string.letters +
+ string.digits + './'))
self.crypt = crypt.crypt (password, salt)
self.pure = password
@@ -120,8 +120,8 @@ def cryptPassword(password, useMD5):
saltLen = 2
for i in range(saltLen):
- salt = salt + whrandom.choice (string.letters +
- string.digits + './')
+ salt = salt + random.choice (string.letters +
+ string.digits + './')
return crypt.crypt (password, salt)