specify exception; convert match result to None
This commit is contained in:
parent
8aa27dcdf5
commit
77e6b395e5
@ -306,9 +306,9 @@ class AddonsDialog(QDialog):
|
||||
def _onAddonItemSelected(self, row_int):
|
||||
try:
|
||||
addon = self.addons[row_int][1]
|
||||
except:
|
||||
except IndexError:
|
||||
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):
|
||||
meta = self.mgr.addonMeta(dir)
|
||||
|
Loading…
Reference in New Issue
Block a user