def samefile_exists_on_target(self, otherShaItem): ''' This method should be private. It should run after file_exists_on_target() :param otherShaItem: :return: ''' # at this point, file exists on target, we should check its sha1-hash other_sha1hex = sha1complementer.calculate_sha1hex_from_file(otherShaItem.file_abspath) if other_sha1hex == self.sha1hex: return True return False
def get_sha1hex_from_path(self, file_abspath): return sha1complementer.calculate_sha1hex_from_file(file_abspath)