mirror of
https://github.com/ankitects/anki.git
synced 2025-11-08 05:37:12 -05:00
specify exception; convert match result to None
This commit is contained in:
parent
8aa27dcdf5
commit
77e6b395e5
1 changed files with 2 additions and 2 deletions
|
|
@ -306,9 +306,9 @@ class AddonsDialog(QDialog):
|
||||||
def _onAddonItemSelected(self, row_int):
|
def _onAddonItemSelected(self, row_int):
|
||||||
try:
|
try:
|
||||||
addon = self.addons[row_int][1]
|
addon = self.addons[row_int][1]
|
||||||
except:
|
except IndexError:
|
||||||
addon = ''
|
addon = ''
|
||||||
self.form.viewPage.setEnabled(True if re.match(r"^\d+$", addon) else False)
|
self.form.viewPage.setEnabled(bool (re.match(r"^\d+$", addon)))
|
||||||
|
|
||||||
def annotatedName(self, dir):
|
def annotatedName(self, dir):
|
||||||
meta = self.mgr.addonMeta(dir)
|
meta = self.mgr.addonMeta(dir)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue