From 9abe30893e8d2c22ada0e2c2faecee1786eaf180 Mon Sep 17 00:00:00 2001 From: Charles Haley Date: Sun, 9 Mar 2025 13:35:10 +0000 Subject: [PATCH] Make the db tests happy --- src/calibre/library/database2.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/library/database2.py b/src/calibre/library/database2.py index 7d27291265..ff0d30e293 100644 --- a/src/calibre/library/database2.py +++ b/src/calibre/library/database2.py @@ -152,7 +152,10 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns): def __init__(self, library_path, row_factory=False, default_prefs=None, read_only=False, is_second_db=False, progress_callback=None, - restore_all_prefs=False): + restore_all_prefs=False, temp_db_path=None): + if temp_db_path is not None: + raise ValueError("temp_db_path isn't supported in by the obsolete " + "library.database2. Use db.legacy.LibraryDatabase instead") self.is_second_db = is_second_db try: if isbytestring(library_path):