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

Last change on this file since 149100 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
  • sitemap_gen.py

     
    6262import fnmatch
    6363import glob
    6464import gzip
    65 import md5
     65import hashlib
    6666import os
    6767import re
    6868import stat
     
    425425    """ Output and count a warning.  Suppress duplicate warnings. """
    426426    if text:
    427427      text = encoder.NarrowText(text, None)
    428       hash = md5.new(text).digest()
     428      hash = hashlib.md5(text).digest()
    429429      if not self._warns_shown.has_key(hash):
    430430        self._warns_shown[hash] = 1
    431431        print '[WARNING] ' + text
     
    438438    """ Output and count an error.  Suppress duplicate errors. """
    439439    if text:
    440440      text = encoder.NarrowText(text, None)
    441       hash = md5.new(text).digest()
     441      hash = hashlib.md5(text).digest()
    442442      if not self._errors_shown.has_key(hash):
    443443        self._errors_shown[hash] = 1
    444444        print '[ERROR] ' + text
     
    648648    if not self.loc:
    649649      return None
    650650    if self.loc.endswith('/'):
    651       return md5.new(self.loc[:-1]).digest()
    652     return md5.new(self.loc).digest()
     651      return hashlib.md5(self.loc[:-1]).digest()
     652    return hashlib.md5(self.loc).digest()
    653653  #end def MakeHash
    654654
    655655  def Log(self, prefix='URL', level=3):
Note: See TracBrowser for help on using the repository browser.