Fixed str being used as bytes in daemonize

This commit is contained in:
vieira 2015-12-09 00:38:26 +00:00 committed by Brian May
parent 9a77d03edf
commit 2eeea9536a

View File

@ -67,7 +67,7 @@ def daemonize():
outfd = os.open(_pidname, os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o666)
try:
os.write(outfd, '%d\n' % os.getpid())
os.write(outfd, b'%d\n' % os.getpid())
finally:
os.close(outfd)
os.chdir("/")