summarylogtreecommitdiffstats
path: root/Python-Replace-MD5-Hashlib.patch
blob: e1e97f682043e98f2a43054c876f820f8166d066 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Index: MagickThumbnail/magickthumb.py
===================================================================
--- MagickThumbnail.orig/magickthumb.py
+++ MagickThumbnail/magickthumb.py
@@ -14,7 +14,7 @@ To use this in ROX-Filer, get a recent v
 click on "Install handlers".  """
 
 import os, sys
-import md5
+import hashlib
 import rox
 
 import thumb
@@ -111,7 +111,7 @@ def main(argv):
     # Out file name is based on MD5 hash of the URI
     if not outname:
         uri='file://'+inname
-        tmp=md5.new(uri).digest()
+        tmp=hashlib.md5(uri).digest()
         leaf=''
         for c in tmp:
             leaf+='%02x' % ord(c)
Index: MagickThumbnail/thumb.py
===================================================================
--- MagickThumbnail.orig/thumb.py
+++ MagickThumbnail/thumb.py
@@ -9,7 +9,7 @@ useful implemetation is VideoThumbnail.
 """
 
 import os, sys
-import md5
+import hashlib
 
 import rox
 
@@ -38,7 +38,7 @@ class Thumbnailler:
         """
         if not outname:
             uri='file://'+inname
-            tmp=md5.new(uri).digest()
+            tmp=hashlib.md5(uri).digest()
             leaf=''
             for c in tmp:
                 leaf+='%02x' % ord(c)