Add an exception that allows add-ons to abort early
This commit is contained in:
parent
b1f4ea562a
commit
fa6a0a1283
@ -46,6 +46,10 @@ from aqt.utils import (
|
||||
)
|
||||
|
||||
|
||||
class AbortAddonImport(Exception):
|
||||
"""Add-ons may raise this exception to abort their import"""
|
||||
|
||||
|
||||
@dataclass
|
||||
class InstallOk:
|
||||
name: str
|
||||
@ -211,6 +215,8 @@ class AddonManager:
|
||||
self.dirty = True
|
||||
try:
|
||||
__import__(addon.dir_name)
|
||||
except AbortAddonImport:
|
||||
pass
|
||||
except:
|
||||
showWarning(
|
||||
tr(
|
||||
|
Loading…
Reference in New Issue
Block a user