mirror of
https://github.com/DarkflameUniverse/NexusDashboard.git
synced 2024-11-21 21:17:23 +00:00
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)
|
||||
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
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user