mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 09:28:41 +00:00
[AutoAdd] Fixed error dialog not being shown on error
This happened due to the removal of `exception_msg` attribute, which was
removed with the changes to `RPC` protocol in commit 9b812a4
.
Now we access the message using the `message` attribute.
Closes: deluge-torrent/deluge#332
Closes: https://dev.deluge-torrent.org/ticket/3069
This commit is contained in:
parent
fca08cf583
commit
4f0c786649
2 changed files with 2 additions and 7 deletions
|
@ -324,7 +324,7 @@ class OptionsDialog:
|
||||||
dialogs.ErrorDialog(_('Incompatible Option'), str(ex), self.dialog).run()
|
dialogs.ErrorDialog(_('Incompatible Option'), str(ex), self.dialog).run()
|
||||||
|
|
||||||
def on_error_show(self, result):
|
def on_error_show(self, result):
|
||||||
d = dialogs.ErrorDialog(_('Error'), result.value.exception_msg, self.dialog)
|
d = dialogs.ErrorDialog(_('Error'), result.value.message, self.dialog)
|
||||||
result.cleanFailure()
|
result.cleanFailure()
|
||||||
d.run()
|
d.run()
|
||||||
|
|
||||||
|
|
|
@ -58,13 +58,8 @@ class Command(BaseCommand):
|
||||||
return component.start()
|
return component.start()
|
||||||
|
|
||||||
def on_connect_fail(result):
|
def on_connect_fail(result):
|
||||||
try:
|
|
||||||
msg = result.value.exception_msg
|
|
||||||
except AttributeError:
|
|
||||||
msg = result.value.message
|
|
||||||
self.console.write(
|
self.console.write(
|
||||||
'{!error!}Failed to connect to %s:%s with reason: %s'
|
f'{{!error!}}Failed to connect to {host}:{port} with reason: {result.value.message}'
|
||||||
% (host, port, msg)
|
|
||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue