# HG changeset patch # User Yuya Nishihara # Date 1496325929 -32400 # Node ID e48cb1c7a90224598344e908c175535cf7573022 # Parent 6df193b5c437da9ed1dd81e88dedf0b06522d3a7 py3: simply use b'%d\n' to format pid in server.py Spotted by Martin, thanks. diff -r 6df193b5c437 -r e48cb1c7a902 mercurial/server.py --- a/mercurial/server.py Thu Jun 01 22:43:24 2017 +0900 +++ b/mercurial/server.py Thu Jun 01 23:05:29 2017 +0900 @@ -33,7 +33,7 @@ else: mode = 'wb' fp = open(opts['pid_file'], mode) - fp.write(str(pid).encode('latin1') + '\n') + fp.write('%d\n' % pid) fp.close() if opts['daemon'] and not opts['daemon_postexec']: