def __recognized(self, pathname): with open(pathname) as f: body = f.read() new_hash = hashdigest(self.salt + body) try: known_hash = options.get_hashpath(pathname) except bleachbit.NoOptionError: return NEW, new_hash if new_hash == known_hash: return KNOWN, new_hash return CHANGED, new_hash
def __recognized(self, pathname): """Is pathname recognized?""" with open(pathname) as f: body = f.read() new_hash = hashdigest(self.salt + body) try: known_hash = options.get_hashpath(pathname) except bleachbit.NoOptionError: return NEW, new_hash if new_hash == known_hash: return KNOWN, new_hash return CHANGED, new_hash