11308: Fix bytes vs. str problems.
[arvados.git] / sdk / python / arvados / cache.py
index ac6d18463c540ad2af84d3b76a9db2129cfa333e..868b478ac5112bdfd9e290d8ffba900f40980b79 100644 (file)
@@ -1,5 +1,6 @@
+from builtins import object
 import errno
-import md5
+import hashlib
 import os
 import tempfile
 import time
@@ -32,7 +33,7 @@ class SafeHTTPCache(object):
         return self._dir
 
     def _filename(self, url):
-        return os.path.join(self._dir, md5.new(url).hexdigest()+'.tmp')
+        return os.path.join(self._dir, hashlib.md5(url).hexdigest()+'.tmp')
 
     def get(self, url):
         filename = self._filename(url)