mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 08:46:37 -04:00
don't create media db on server
This commit is contained in:
parent
5c5181f063
commit
ba0f6f36cc
1 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,8 @@ class MediaManager(object):
|
|||
self.connect()
|
||||
|
||||
def connect(self):
|
||||
if self.col.server:
|
||||
return
|
||||
path = self.dir()+".db"
|
||||
create = not os.path.exists(path)
|
||||
self.db = DB(path)
|
||||
|
@ -35,6 +37,8 @@ class MediaManager(object):
|
|||
self._initDB()
|
||||
|
||||
def close(self):
|
||||
if self.col.server:
|
||||
return
|
||||
self.db.close()
|
||||
self.db = None
|
||||
|
||||
|
|
Loading…
Reference in a new issue