diff options
author | DjLegolas <djlegolas@protonmail.com> | 2022-01-04 22:10:00 +0200 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2022-01-06 10:06:03 +0000 |
commit | 4f0c786649ed80f5410173928d9370ac49d72ea3 (patch) | |
tree | 0e08aea669f1d019d940afe09f1fca64fbb19b73 | |
parent | fca08cf5835a65f37528fa491dfaf2840e99e315 (diff) | |
download | deluge-4f0c786649ed80f5410173928d9370ac49d72ea3.tar.gz deluge-4f0c786649ed80f5410173928d9370ac49d72ea3.tar.bz2 deluge-4f0c786649ed80f5410173928d9370ac49d72ea3.zip |
[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
-rw-r--r-- | deluge/plugins/AutoAdd/deluge_autoadd/gtkui.py | 2 | ||||
-rw-r--r-- | deluge/ui/console/cmdline/commands/connect.py | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/deluge/plugins/AutoAdd/deluge_autoadd/gtkui.py b/deluge/plugins/AutoAdd/deluge_autoadd/gtkui.py index fc9954ce0..92ef1188c 100644 --- a/deluge/plugins/AutoAdd/deluge_autoadd/gtkui.py +++ b/deluge/plugins/AutoAdd/deluge_autoadd/gtkui.py @@ -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() diff --git a/deluge/ui/console/cmdline/commands/connect.py b/deluge/ui/console/cmdline/commands/connect.py index d917fdcca..4c76de38f 100644 --- a/deluge/ui/console/cmdline/commands/connect.py +++ b/deluge/ui/console/cmdline/commands/connect.py @@ -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 |