Ejemplo n.º 1
0
 def update(self, filename, lazy=False):
     hash = unicode(md5(filename))
     self.log(u"UPDATING HASH for %s from %s to %s" % (
              filename, self.filehash.get(filename, "(none)"), hash))
     self.filehash[filename] = hash
     if not lazy:
         self.save()
Ejemplo n.º 2
0
 def has_been_touched(self, filename):
     if filename not in self.filehash:
         return True  # it didn't exist before
     return self.filehash[filename] != md5(filename)