From 1ab350b02202b673954e583a21615147f3bde393 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 6 Sep 2010 16:54:18 -0600 Subject: [PATCH] Cleaner connection to db when generating catalog --- src/calibre/gui2/convert/gui_conversion.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/calibre/gui2/convert/gui_conversion.py b/src/calibre/gui2/convert/gui_conversion.py index 148dc328ad..3072b8757a 100644 --- a/src/calibre/gui2/convert/gui_conversion.py +++ b/src/calibre/gui2/convert/gui_conversion.py @@ -27,13 +27,8 @@ def gui_catalog(fmt, title, dbspec, ids, out_file_name, sync, fmt_options, conne notification=DummyReporter(), log=None): if log is None: log = Log() - if dbspec is None: - from calibre.utils.config import prefs - from calibre.library.database2 import LibraryDatabase2 - dbpath = prefs['library_path'] - db = LibraryDatabase2(dbpath) - else: # To be implemented in the future - pass + from calibre.library import db + db = db() # Create a minimal OptionParser that we can append to parser = OptionParser()