mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Cleaner connection to db when generating catalog
This commit is contained in:
parent
6132923db6
commit
1ab350b022
@ -27,13 +27,8 @@ def gui_catalog(fmt, title, dbspec, ids, out_file_name, sync, fmt_options, conne
|
|||||||
notification=DummyReporter(), log=None):
|
notification=DummyReporter(), log=None):
|
||||||
if log is None:
|
if log is None:
|
||||||
log = Log()
|
log = Log()
|
||||||
if dbspec is None:
|
from calibre.library import db
|
||||||
from calibre.utils.config import prefs
|
db = db()
|
||||||
from calibre.library.database2 import LibraryDatabase2
|
|
||||||
dbpath = prefs['library_path']
|
|
||||||
db = LibraryDatabase2(dbpath)
|
|
||||||
else: # To be implemented in the future
|
|
||||||
pass
|
|
||||||
|
|
||||||
# Create a minimal OptionParser that we can append to
|
# Create a minimal OptionParser that we can append to
|
||||||
parser = OptionParser()
|
parser = OptionParser()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user