index 97c16f410ba78c34270424e467c2a66661a0dd26..51becb0880fffc929ee93ee67a914d96392ababa 100644 (file)
--- a/roundup/install_util.py
+++ b/roundup/install_util.py
# 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
del lines[-1]
# calculate current digest
- digest = sha.new()
+ digest = sha1()
for line in lines:
digest.update(line)
def __init__(self, filename):
self.filename = filename
- self.digest = sha.new()
+ self.digest = sha1()
self.file = open(self.filename, "w")
def write(self, data):