[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
@ -324,7 +324,7 @@ class OptionsDialog:
|
||||
dialogs.ErrorDialog(_('Incompatible Option'), str(ex), self.dialog).run()
|
||||
|
||||
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()
|
||||
d.run()
|
||||
|
||||
|
||||
@ -58,13 +58,8 @@ class Command(BaseCommand):
|
||||
return component.start()
|
||||
|
||||
def on_connect_fail(result):
|
||||
try:
|
||||
msg = result.value.exception_msg
|
||||
except AttributeError:
|
||||
msg = result.value.message
|
||||
self.console.write(
|
||||
'{!error!}Failed to connect to %s:%s with reason: %s'
|
||||
% (host, port, msg)
|
||||
f'{{!error!}}Failed to connect to {host}:{port} with reason: {result.value.message}'
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user