From e2b3981d8499db82c9691e8de445f9a904707903 Mon Sep 17 00:00:00 2001 From: DocGarbanzo Date: Tue, 12 Dec 2023 22:28:53 +0000 Subject: [PATCH] Remove obsolete argument in tub --- donkeycar/parts/datastore_v2.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/donkeycar/parts/datastore_v2.py b/donkeycar/parts/datastore_v2.py index 9bd3d9810..c1ae56120 100644 --- a/donkeycar/parts/datastore_v2.py +++ b/donkeycar/parts/datastore_v2.py @@ -287,12 +287,11 @@ def exit_hook(): # Automatically save config when program ends atexit.register(exit_hook) - def write_record(self, record, index=None): - if index is None: - new_catalog = self.current_index > 0 \ - and (self.current_index % self.max_len) == 0 - if new_catalog: - self._add_catalog() + def write_record(self, record): + new_catalog = self.current_index > 0 \ + and (self.current_index % self.max_len) == 0 + if new_catalog: + self._add_catalog() self.current_catalog.write_record(record) self.current_index += 1 @@ -416,8 +415,6 @@ def add_deleted_indexes(self, indexes): self.deleted_indexes.update(indexes) self._update_catalog_metadata(update=True) - - def close(self): """ Closing tub closes open files for catalog, catalog manifest and manifest.json"""