dabo Commit
Revision 5929
Date: 2010-07-17 13:40:53 -0700 (Sat, 17 Jul 2010)
Author: Johnf
Trac: http://trac.dabodev.com/changeset/5929

Changed:
U   trunk/dabo/lib/reportWriter.py
U   trunk/dabo/lib/uuid.py

Log:
removed the ref to md5 and replaced with hashlib.  haslib is currently already 
being used in dDataSet.py and md5 has been deprecated (those users of python 
2.4 or less need to install the hashlib.py)

Diff:
Modified: trunk/dabo/lib/reportWriter.py
===================================================================
--- trunk/dabo/lib/reportWriter.py      2010-07-14 19:04:58 UTC (rev 5928)
+++ trunk/dabo/lib/reportWriter.py      2010-07-17 20:40:53 UTC (rev 5929)
@@ -2253,10 +2253,10 @@
 
        def _getUniqueName(self):
                """Returns a name that should be unique, but it doesn't check 
to make sure."""
-               import time, md5, random
+               import time, hashlib, random
                t1 = time.time()
                t2 = t1 + random.random()
-               base = md5.new(ustr(t1 +t2))
+               base = hashlib.md5(ustr(t1 +t2))
                name = "_" + base.hexdigest()
                return name
        

Modified: trunk/dabo/lib/uuid.py
===================================================================
--- trunk/dabo/lib/uuid.py      2010-07-14 19:04:58 UTC (rev 5928)
+++ trunk/dabo/lib/uuid.py      2010-07-17 20:40:53 UTC (rev 5929)
@@ -444,8 +444,8 @@
 
 def uuid3(namespace, name):
     """Generate a UUID from the MD5 hash of a namespace UUID and a name."""
-    import md5
-    hash = md5.md5(namespace.bytes + name).digest()
+    import hashlib
+    hash = hashlib.md5(namespace.bytes + name).digest()
     return UUID(bytes=hash[:16], version=3)
 
 def uuid4():



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to