diff options
author | DjLegolas <DjLegolas@users.noreply.github.com> | 2019-06-22 22:37:16 +0300 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2019-06-25 10:39:49 +0100 |
commit | 1b4ac88ce72515bcf36684b942e3998900f13cea (patch) | |
tree | 1e23447fa11e3398f54222470b69eb4d2bc0362d | |
parent | 4b29436cd5eabf9af271f3fa6250cd7c91cdbc9d (diff) | |
download | deluge-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
-rw-r--r-- | deluge/argparserbase.py | 2 |
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(): |