mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-10 19:46:22 +00:00
[Common] Fix creation of pidfile via command option
Python 3 raises a TypeError for binary file mode and writing text string. Fixes: #3278
This commit is contained in:
parent
4b29436cd5
commit
1b4ac88ce7
@ -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():
|
||||
|
Loading…
x
Reference in New Issue
Block a user