Author: Matti Picus <[email protected]>
Branch: py3.6
Changeset: r96742:36dc395a0a4a
Date: 2019-06-05 07:38 +0300
http://bitbucket.org/pypy/pypy/changeset/36dc395a0a4a/

Log:    test for str

diff --git a/lib_pypy/_crypt/__init__.py b/lib_pypy/_crypt/__init__.py
--- a/lib_pypy/_crypt/__init__.py
+++ b/lib_pypy/_crypt/__init__.py
@@ -15,6 +15,10 @@
 
 
 def crypt(word, salt):
+    if isinstance(word, str):
+        word = word.encode('ascii')
+    if isinstance(salt, str):
+        salt = salt.encode('ascii')
     res = lib.crypt(word, salt)
     if not res:
         return None
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to