instead of saying "recording <file> with hash ''" where the
hash is empty, log that a new file is being recorded
No functional change outside of the log message.
def add(self, filename):
checksum = self.md5(filename)
- logger.debug("Recording file %s with hash '%s'.", filename, checksum)
+ if not checksum:
+ logger.debug("Recording new file %s" % (filename))
+ else:
+ logger.debug("Recording existing file %s with hash '%s'.",
+ filename, checksum)
self.hashes[filename] = checksum
def md5(self, filename):