diff -r 28ccc71919bf server/filter.py --- a/server/filter.py Thu Sep 03 21:38:15 2009 -0400 +++ b/server/filter.py Thu Sep 03 21:41:58 2009 -0400 @@ -427,7 +427,7 @@ # In order to detect log rotation, the hash (MD5) of the first line of the file # is computed and compared to the previous hash of this line. -import md5 +import hashlib class FileContainer: @@ -440,7 +440,7 @@ try: firstLine = handler.readline() # Computes the MD5 of the first line. - self.__hash = md5.new(firstLine).digest() + self.__hash = hashlib.md5(firstLine).digest() # Start at the beginning of file if tail mode is off. if tail: handler.seek(0, 2) @@ -457,7 +457,7 @@ self.__handler = open(self.__filename) firstLine = self.__handler.readline() # Computes the MD5 of the first line. - myHash = md5.new(firstLine).digest() + myHash = hashlib.md5(firstLine).digest() # Compare hash. if not self.__hash == myHash: logSys.info("Log rotation detected for %s" % self.__filename)