summaryrefslogtreecommitdiffstats
path: root/deluge/argparserbase.py
diff options
context:
space:
mode:
authorDjLegolas <DjLegolas@users.noreply.github.com>2019-06-22 22:37:16 +0300
committerCalum Lind <calumlind+deluge@gmail.com>2019-06-25 10:39:49 +0100
commit1b4ac88ce72515bcf36684b942e3998900f13cea (patch)
tree1e23447fa11e3398f54222470b69eb4d2bc0362d /deluge/argparserbase.py
parent4b29436cd5eabf9af271f3fa6250cd7c91cdbc9d (diff)
downloaddeluge-1b4ac88ce72515bcf36684b942e3998900f13cea.tar.gz
deluge-1b4ac88ce72515bcf36684b942e3998900f13cea.tar.bz2
deluge-1b4ac88ce72515bcf36684b942e3998900f13cea.zip
[Common] Fix creation of pidfile via command option
Python 3 raises a TypeError for binary file mode and writing text string. Fixes: #3278
Diffstat (limited to 'deluge/argparserbase.py')
-rw-r--r--deluge/argparserbase.py2
1 files changed, 1 insertions, 1 deletions
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():