give a warning if conf load fails

This commit is contained in:
Damien Elmes 2012-03-19 22:24:41 +09:00
parent 5d7562a9e4
commit b8ae9f06a8

View file

@ -8,6 +8,7 @@ from anki.utils import isMac, isWin
from anki import Collection from anki import Collection
from anki.importing import Anki1Importer from anki.importing import Anki1Importer
from anki.db import DB from anki.db import DB
from aqt.utils import showWarning
import aqt import aqt
class Upgrader(object): class Upgrader(object):
@ -24,7 +25,9 @@ class Upgrader(object):
try: try:
self._loadConf(p) self._loadConf(p)
except: except:
# can't load old config file showWarning(_("""\
Anki wasn't able to load your old config file. Please use File>Import \
to import your decks from previous Anki versions."""))
return return
self._copySettings() self._copySettings()
# and show the wizard # and show the wizard