def __iter__(self): """Iterate through all timestamps in the timestamp log""" while True: try: reader = PacketReader(self.fd) except PacketMissingError: break ctx = StreamDeserializationContext(reader) try: length = ctx.read_varuint() file_hash = ctx.read_bytes(self.file_hash_op.DIGEST_LENGTH) timestamp = Timestamp.deserialize(ctx, file_hash) yield (length, timestamp) except DeserializationError as exp: # FIXME: should provide a way to get insight into these errors pass