Changeset - 4d3179d2adfe
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2012-02-14 22:33:08
marcin@python-works.com
added optional password type in password generator
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/auth.py
Show inline comments
 
@@ -80,7 +80,9 @@ class PasswordGenerator(object):
 
    def __init__(self, passwd=''):
 
        self.passwd = passwd
 

	
 
    def gen_password(self, length, type_):
 
    def gen_password(self, length, type_=None):
 
        if type_ is None:
 
            type_ = self.ALPHABETS_FULL
 
        self.passwd = ''.join([random.choice(type_) for _ in xrange(length)])
 
        return self.passwd
 

	
0 comments (0 inline, 0 general)