Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix bug when updating add-ons automatically
  • Loading branch information
nvdaes committed Sep 23, 2025
commit e372034b0b774e6ee153949c244493bd6c2769f4
2 changes: 1 addition & 1 deletion source/addonHandler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ def _cleanupAddonImports(self) -> None:
self._importedAddonModules.clear()
for modName in set(sys.modules.keys()) - self._modulesBeforeInstall:
module = sys.modules[modName]
if module.__file__ and module.__file__.startswith(self.path):
if module.__name__ and module.__name__.startswith(self.path):
log.debug(f"Removing module {module} from cache of imported modules")
del sys.modules[modName]

Expand Down
6 changes: 3 additions & 3 deletions source/gui/addonStoreGui/controls/messageDialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,9 @@ def delayCreateDialog():
wx.CallAfter(delayCreateDialog)

case AddonsAutomaticUpdate.UPDATE:

# Translators: Message shown when updating add-ons automatically
wx.CallAfter(ui.message, pgettext("addonStore", "Updating add-ons..."), SpeechPriority.NEXT)
threading.Thread(
name="AutomaticAddonUpdate",
>
Expand All @@ -608,9 +611,6 @@ def _updateAddons(addonsPendingUpdate: list[_AddonGUIModel]):
This function is treated as message box to prevent NVDA from exiting while the download/install is in progress.
"""
from ..viewModels.store import AddonStoreVM

# Translators: Message shown when updating add-ons automatically
ui.message(pgettext("addonStore", "Updating add-ons..."), SpeechPriority.NEXT)
listVMs = {AddonListItemVM(a, status=getStatus(a, _StatusFilterKey.UPDATE)) for a in addonsPendingUpdate}
AddonStoreVM.getAddons(
listVMs,
Expand Down