This commit is contained in:
Kovid Goyal 2011-10-10 15:02:14 +05:30
parent 73621c9001
commit 64f0f0fd9d

View File

@ -47,6 +47,9 @@ def get_parser(usage):
def get_db(dbpath, options): def get_db(dbpath, options):
if options.library_path is not None: if options.library_path is not None:
dbpath = options.library_path dbpath = options.library_path
if dbpath is None:
raise ValueError('No saved library path, either run the GUI or use the'
' --with-library option')
dbpath = os.path.abspath(dbpath) dbpath = os.path.abspath(dbpath)
return LibraryDatabase2(dbpath) return LibraryDatabase2(dbpath)