Fixes #55
fall back to CDServer.sqlite if cdclient.sqlite doesn't exist
This commit is contained in:
parent
e69d25594a
commit
ba157a3715
@ -191,7 +191,16 @@ def get_cdclient():
|
|||||||
"""
|
"""
|
||||||
cdclient = getattr(g, '_cdclient', None)
|
cdclient = getattr(g, '_cdclient', None)
|
||||||
if cdclient is None:
|
if cdclient is None:
|
||||||
cdclient = g._database = sqlite3.connect('app/luclient/res/cdclient.sqlite')
|
path = pathlib.Path('app/luclient/res/cdclient.sqlite')
|
||||||
|
if path.is_file():
|
||||||
|
cdclient = g._database = sqlite3.connect('app/luclient/res/cdclient.sqlite')
|
||||||
|
return cdclient
|
||||||
|
|
||||||
|
path = pathlib.Path('app/luclient/res/CDServer.sqlite')
|
||||||
|
if path.is_file():
|
||||||
|
cdclient = g._database = sqlite3.connect('app/luclient/res/CDServer.sqlite')
|
||||||
|
return cdclient
|
||||||
|
|
||||||
return cdclient
|
return cdclient
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user