1
0

fix: download_plugin_dialog has no access to run_coroutine_dialog

download_plugin_dialog tried to run the zip download with
self.window.run_coroutine_dialog, but self has no window,
instanciating a RunCoroutineDialog directly fixes this.
This commit is contained in:
f321x
2025-04-29 11:01:07 +02:00
parent 1cce216c1f
commit eed944368c

View File

@@ -9,8 +9,8 @@ from PyQt6.QtCore import Qt
from electrum.i18n import _
from electrum.logging import get_logger
from .util import WindowModalDialog, Buttons, CloseButton, WWLabel, insert_spaces, MessageBoxMixin, EnterButton
from .util import read_QIcon_from_bytes, IconLabel
from .util import (WindowModalDialog, Buttons, CloseButton, WWLabel, insert_spaces, MessageBoxMixin,
EnterButton, read_QIcon_from_bytes, IconLabel, RunCoroutineDialog)
if TYPE_CHECKING:
@@ -254,7 +254,8 @@ class PluginsDialog(WindowModalDialog, MessageBoxMixin):
return
coro = self.plugins.download_external_plugin(url)
try:
path = self.window.run_coroutine_dialog(coro, _("Downloading plugin..."))
d = RunCoroutineDialog(self, _("Downloading plugin..."), coro)
path = d.run()
except UserCancelled:
return
except Exception as e: