source: trunk/dports/www/sitemap_gen/files/patch-sitemap_gen_py.diff @ 87969

Last change on this file since 87969 was 87969, checked in by and.damore@…, 8 years ago

port sitemap_gen: updated to 1.5, added license, added patch from upstream's issue tracker, changed homepage. Closing ticket #31273, maintainer timeout

File size: 1.2 KB
RevLine 
[87969]1--- sitemap_gen.py      (revision 36)
2+++ sitemap_gen.py      (working copy)
3@@ -62,7 +62,7 @@
4 import fnmatch
5 import glob
6 import gzip
7-import md5
8+import hashlib
9 import os
10 import re
11 import stat
12@@ -425,7 +425,7 @@
13     """ Output and count a warning.  Suppress duplicate warnings. """
14     if text:
15       text = encoder.NarrowText(text, None)
16-      hash = md5.new(text).digest()
17+      hash = hashlib.md5(text).digest()
18       if not self._warns_shown.has_key(hash):
19         self._warns_shown[hash] = 1
20         print '[WARNING] ' + text
21@@ -438,7 +438,7 @@
22     """ Output and count an error.  Suppress duplicate errors. """
23     if text:
24       text = encoder.NarrowText(text, None)
25-      hash = md5.new(text).digest()
26+      hash = hashlib.md5(text).digest()
27       if not self._errors_shown.has_key(hash):
28         self._errors_shown[hash] = 1
29         print '[ERROR] ' + text
30@@ -648,8 +648,8 @@
31     if not self.loc:
32       return None
33     if self.loc.endswith('/'):
34-      return md5.new(self.loc[:-1]).digest()
35-    return md5.new(self.loc).digest()
36+      return hashlib.md5(self.loc[:-1]).digest()
37+    return hashlib.md5(self.loc).digest()
38   #end def MakeHash
39 
40   def Log(self, prefix='URL', level=3):
Note: See TracBrowser for help on using the repository browser.