aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2010-10-15 09:40:35 +0000
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2010-10-15 09:40:35 +0000
commitd8c36a4fa64072aeda8279b25c987a7f8a1a7f4a (patch)
tree5939180532e7d496632dc987cc93aa948d1a4574 /lib_pypy/_md5.py
parentFix ctypes tests (diff)
downloadpypy-d8c36a4fa64072aeda8279b25c987a7f8a1a7f4a.tar.gz
pypy-d8c36a4fa64072aeda8279b25c987a7f8a1a7f4a.tar.bz2
pypy-d8c36a4fa64072aeda8279b25c987a7f8a1a7f4a.zip
Try to fix tests
Diffstat (limited to 'lib_pypy/_md5.py')
-rw-r--r--lib_pypy/_md5.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib_pypy/_md5.py b/lib_pypy/_md5.py
index 4276f0a005..856ca0cb85 100644
--- a/lib_pypy/_md5.py
+++ b/lib_pypy/_md5.py
@@ -375,11 +375,14 @@ class MD5Type:
digest_size = 16
-def md5(arg=None):
- """Same as new().
-
- For backward compatibility reasons, this is an alternative
- name for the new() function.
+def new(arg=None):
+ """Return a new md5 crypto object.
+ If arg is present, the method call update(arg) is made.
"""
- return new(arg)
+ crypto = MD5Type()
+ if arg:
+ crypto.update(arg)
+
+ return crypto
+