From 1b4ac88ce72515bcf36684b942e3998900f13cea Mon Sep 17 00:00:00 2001 From: DjLegolas Date: Sat, 22 Jun 2019 22:37:16 +0300 Subject: [Common] Fix creation of pidfile via command option Python 3 raises a TypeError for binary file mode and writing text string. Fixes: #3278 --- deluge/argparserbase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deluge/argparserbase.py b/deluge/argparserbase.py index 3952e1ef3..af9d568fa 100644 --- a/deluge/argparserbase.py +++ b/deluge/argparserbase.py @@ -325,7 +325,7 @@ class ArgParserBase(argparse.ArgumentParser): # Write pid file before chuid if options.pidfile: - with open(options.pidfile, 'wb') as _file: + with open(options.pidfile, 'w') as _file: _file.write('%d\n' % os.getpid()) if not common.windows_check(): -- cgit