Skip to content

Commit

Permalink
MultiLogIterator: fix after adding sort_by_time
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh authored Jan 3, 2022
1 parent 30e8383 commit bbb47dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/lib/logreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
class MultiLogIterator:
def __init__(self, log_paths, sort_by_time=False):
self._log_paths = log_paths
self.sort_by_time = sort_by_time

self._first_log_idx = next(i for i in range(len(log_paths)) if log_paths[i] is not None)
self._current_log = self._first_log_idx
self._idx = 0
self._log_readers = [None]*len(log_paths)
self.start_time = self._log_reader(self._first_log_idx)._ts[0]
self.sort_by_time = sort_by_time

def _log_reader(self, i):
if self._log_readers[i] is None and self._log_paths[i] is not None:
Expand Down

0 comments on commit bbb47dc

Please sign in to comment.