Skip to content

Commit

Permalink
[Common] Fix creation of pidfile via command option
Browse files Browse the repository at this point in the history
Python 3 raises a TypeError for binary file mode and writing text string.

Fixes: #3278
  • Loading branch information
DjLegolas authored and cas-- committed Jun 25, 2019
1 parent 4b29436 commit 1b4ac88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deluge/argparserbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def _handle_ui_options(self, options):

# 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():
Expand Down

0 comments on commit 1b4ac88

Please sign in to comment.