Code

Add config-option "nosy" to messages_to_author setting in [nosy] section
[roundup.git] / roundup / install_util.py
index 97c16f410ba78c34270424e467c2a66661a0dd26..51becb0880fffc929ee93ee67a914d96392ababa 100644 (file)
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: install_util.py,v 1.10 2004-02-11 23:55:08 richard Exp $
+# $Id: install_util.py,v 1.11 2006-01-25 03:11:43 richard Exp $
 
 """Support module to generate and check fingerprints of installed files.
 """
 __docformat__ = 'restructuredtext'
 
-import os, sha, shutil
+import os, shutil
+from roundup.anypy.hashlib_ import sha1
 
-# ".filter", ".index", ".item", ".newitem" are roundup-specific
-sgml_file_types = [".xml", ".ent", ".html", ".filter", ".index", ".item", ".newitem"]
-hash_file_types = [".py", ".sh", ".conf", ".cgi", '']
+sgml_file_types = [".xml", ".ent", ".html"]
+hash_file_types = [".py", ".sh", ".conf", ".cgi"]
 slast_file_types = [".css"]
 
 digested_file_types = sgml_file_types + hash_file_types + slast_file_types
@@ -60,7 +60,7 @@ def checkDigest(filename):
     del lines[-1]
 
     # calculate current digest
-    digest = sha.new()
+    digest = sha1()
     for line in lines:
         digest.update(line)
 
@@ -75,7 +75,7 @@ class DigestFile:
 
     def __init__(self, filename):
         self.filename = filename
-        self.digest = sha.new()
+        self.digest = sha1()
         self.file = open(self.filename, "w")
 
     def write(self, data):