note about licence, fix copyright, fix case of unicode argument 3.5
authorAurelien Campeas
Wed, 09 Sep 2009 17:50:45 +0200
branch3.5
changeset 3149 c6a85fafb155
parent 3148 81d373245ce9
child 3150 20c0ba65ee0b
note about licence, fix copyright, fix case of unicode argument
md5crypt.py
--- a/md5crypt.py	Wed Sep 09 17:49:06 2009 +0200
+++ b/md5crypt.py	Wed Sep 09 17:50:45 2009 +0200
@@ -1,10 +1,8 @@
 #########################################################
 """
-
+XXX clarify this header
 :organization: Logilab
-:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
-:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
 """
 # md5crypt.py
 #
@@ -58,8 +56,9 @@
         v = v >> 6
     return ret
 
-
 def crypt(pw, salt, magic=None):
+    if isinstance(pw, unicode):
+        pw = pw.encode('utf-8')
     if magic is None:
         magic = MAGIC
     # Take care of the magic string if present