mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
Fix "Add-ons possibly involved" message never appearing on Windows (#2536)
This commit is contained in:
parent
fadeb99c99
commit
7044f0c53c
1 changed files with 3 additions and 2 deletions
|
@ -251,12 +251,13 @@ class ErrorHandler(QObject):
|
|||
sys.exit(1)
|
||||
|
||||
def _addonText(self, error: str) -> str:
|
||||
matches = re.findall(r"addons21/(.*?)/", error)
|
||||
matches = re.findall(r"addons21(/|\\)(.*?)(/|\\)", error)
|
||||
if not matches:
|
||||
return ""
|
||||
# reverse to list most likely suspect first, dict to deduplicate:
|
||||
addons = [
|
||||
aqt.mw.addonManager.addonName(i) for i in dict.fromkeys(reversed(matches))
|
||||
aqt.mw.addonManager.addonName(i[1])
|
||||
for i in dict.fromkeys(reversed(matches))
|
||||
]
|
||||
# highlight importance of first add-on:
|
||||
addons[0] = f"<b>{addons[0]}</b>"
|
||||
|
|
Loading…
Reference in a new issue