Show More
@@ -80,7 +80,9 b' class PasswordGenerator(object):' | |||
|
80 | 80 | def __init__(self, passwd=''): |
|
81 | 81 | self.passwd = passwd |
|
82 | 82 | |
|
83 | def gen_password(self, length, type_): | |
|
83 | def gen_password(self, length, type_=None): | |
|
84 | if type_ is None: | |
|
85 | type_ = self.ALPHABETS_FULL | |
|
84 | 86 | self.passwd = ''.join([random.choice(type_) for _ in xrange(length)]) |
|
85 | 87 | return self.passwd |
|
86 | 88 |
General Comments 0
You need to be logged in to leave comments.
Login now