From cc645be7e1eaf8cdc0f52289d2ecba071dce23dd Mon Sep 17 00:00:00 2001 From: Pedro Q Date: Sat, 16 Apr 2022 14:40:46 +0200 Subject: [PATCH] update generate_inserts --- mantis/Metadata_SQLITE_Connector.py | 6 ++---- mantis/Taxonomy_SQLITE_Connector.py | 5 ++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/mantis/Metadata_SQLITE_Connector.py b/mantis/Metadata_SQLITE_Connector.py index 2d30877..11fe9a5 100644 --- a/mantis/Metadata_SQLITE_Connector.py +++ b/mantis/Metadata_SQLITE_Connector.py @@ -138,12 +138,10 @@ def generate_inserts(self, metadata_yielder): step=self.insert_step temp=[] for i in metadata_yielder: - if len(temp)=step: yield temp temp=[] - temp.append(i) yield temp def store_metadata(self): diff --git a/mantis/Taxonomy_SQLITE_Connector.py b/mantis/Taxonomy_SQLITE_Connector.py index 8c5c3d0..332148f 100644 --- a/mantis/Taxonomy_SQLITE_Connector.py +++ b/mantis/Taxonomy_SQLITE_Connector.py @@ -151,9 +151,8 @@ def generate_inserts(self, input_generator): step=self.insert_step temp=[] for i in input_generator: - if len(temp)=step: yield temp temp=[] yield temp