mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 03:24:54 +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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue