def valid(self): for path, ident in self.files.items(): if not os.path.exists(path) or hash.file_hash(path) != ident: return False return True
def extend(self, more_files): for f in more_files: self.files[os.path.abspath(f)] = hash.file_hash(f)