summaryrefslogtreecommitdiff
path: root/addons/base_crypt/crypt.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/base_crypt/crypt.py')
-rw-r--r--addons/base_crypt/crypt.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/base_crypt/crypt.py b/addons/base_crypt/crypt.py
index b27dad22363..81a60a5dd5f 100644
--- a/addons/base_crypt/crypt.py
+++ b/addons/base_crypt/crypt.py
@@ -47,7 +47,9 @@ import logging
magic_md5 = '$1$'
_logger = logging.getLogger(__name__)
-def gen_salt( length=8, symbols=ascii_letters + digits ):
+def gen_salt( length=8, symbols=None):
+ if symbols is None:
+ symbols = ascii_letters + digits
seed()
return ''.join( sample( symbols, length ) )