fix error reporting when collection not open

This commit is contained in:
Damien Elmes 2018-06-21 15:51:32 +10:00
parent 9b5ee4ba44
commit 8421399020

View File

@ -143,9 +143,15 @@ add-ons section</a> of our support site.
else: else:
platname = "Linux" platname = "Linux"
def schedVer():
try:
return self.mw.col.schedVer()
except:
return "?"
return """\ return """\
Anki {} Python {} Qt {} PyQt {} Anki {} Python {} Qt {} PyQt {}
Platform: {} Platform: {}
Flags: frz={} ao={} sv={} Flags: frz={} ao={} sv={}
""".format(appVersion, platform.python_version(), QT_VERSION_STR, PYQT_VERSION_STR, platname, """.format(appVersion, platform.python_version(), QT_VERSION_STR, PYQT_VERSION_STR, platname,
getattr(sys, "frozen", False), self.mw.addonManager.dirty, self.mw.col.schedVer()) getattr(sys, "frozen", False), self.mw.addonManager.dirty, schedVer())