From 2f5c872563f75673681598e3bef813596d9db63c Mon Sep 17 00:00:00 2001 From: Mike Gerber Date: Wed, 6 Aug 2025 20:18:44 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Explicitly=20set=20con=5Fpage=5F?= =?UTF-8?q?info=20to=20None=20if=20we=20don't=20output=20page=5Finfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mods4pandas/mods4pandas.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mods4pandas/mods4pandas.py b/src/mods4pandas/mods4pandas.py index e12878d..3d71268 100755 --- a/src/mods4pandas/mods4pandas.py +++ b/src/mods4pandas/mods4pandas.py @@ -560,6 +560,8 @@ def process(mets_files: list[str], output_file: str, output_page_info: str): with contextlib.suppress(FileNotFoundError): os.remove(output_page_info_sqlite3) con_page_info = sqlite3.connect(output_page_info_sqlite3) + else: + con_page_info = None # Process METS files with open(output_file + ".warnings.csv", "w") as csvfile: