From 9c90136f57b607937a6deb64481e6785421fd455 Mon Sep 17 00:00:00 2001 From: scudre <20219711+scudre@users.noreply.github.com> Date: Sat, 14 Nov 2020 17:12:32 -0800 Subject: [PATCH] [#3439] Execute plugin fails to run on Windows Fixed TypeError: a bytes-like object is required, not 'str' --- deluge/plugins/Execute/deluge_execute/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/plugins/Execute/deluge_execute/core.py b/deluge/plugins/Execute/deluge_execute/core.py index 9dcd97aaa..f5fa2c2e6 100644 --- a/deluge/plugins/Execute/deluge_execute/core.py +++ b/deluge/plugins/Execute/deluge_execute/core.py @@ -135,7 +135,7 @@ class Core(CorePluginBase): ] if windows_check(): # Escape ampersand on windows (see #2784) - cmd_args = [cmd_arg.replace('&', '^^^&') for cmd_arg in cmd_args] + cmd_args = [cmd_arg.replace(b'&', b'^^^&') for cmd_arg in cmd_args] if os.path.isfile(command) and os.access(command, os.X_OK): log.debug('Running %s with args: %s', command, cmd_args)