Commit c406db14 authored by Andreas Jung's avatar Andreas Jung

better error message for unsupport encoding

parent c685010c
...@@ -65,6 +65,8 @@ def generate_passwd(password, encoding): ...@@ -65,6 +65,8 @@ def generate_passwd(password, encoding):
pw = '{CRYPT}' + crypt(password, generate_salt()) pw = '{CRYPT}' + crypt(password, generate_salt())
elif encoding == 'CLEARTEXT': elif encoding == 'CLEARTEXT':
pw = password pw = password
else:
raise ValueError('Unsupported encoding: %s' % encoding)
return pw return pw
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment