From cd6bad0e35df63cf3d67651bd64bd3d9ee2ecb80 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 18 Oct 2018 16:51:10 +0100 Subject: [PATCH] [UI] Fix passing bytes config path to subprocess on Python 3 The % substitution was causing the bytes prefix to become part of the string and created a `b'/` prefixed config directory. Ensure the config arg is byte prefixed too. --- deluge/ui/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/ui/client.py b/deluge/ui/client.py index 7f37c7b1c..686f962b3 100644 --- a/deluge/ui/client.py +++ b/deluge/ui/client.py @@ -671,7 +671,7 @@ class Client(object): # subprocess.popen does not work with unicode args (with non-ascii characters) on windows config = config.encode(sys.getfilesystemencoding()) try: - subprocess.Popen(['deluged', '--port=%s' % port, '--config=%s' % config]) + subprocess.Popen(['deluged', '--port=%s' % port, b'--config=%s' % config]) except OSError as ex: from errno import ENOENT