# HG changeset patch # User Yuya Nishihara # Date 2014-06-28 04:13:32 # Node ID dd3dd80fca10d1a3a768fab7e2fb4069f752cc0e # Parent 7f2313450e865e8822ef306e03341ab73d7450eb hgweb: make log streams compatible with command server Even though it would be useless to start a web server by a command server, it should be doable in principle. Also, we can't use sys.stdout/err directly on Python 3 because they are unicode streams. diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py --- a/mercurial/hgweb/server.py +++ b/mercurial/hgweb/server.py @@ -281,8 +281,8 @@ class MercurialHTTPServer(_mixin, httpse prefix = '/' + prefix.strip('/') self.prefix = prefix - alog = openlog(ui.config('web', 'accesslog', '-'), sys.stdout) - elog = openlog(ui.config('web', 'errorlog', '-'), sys.stderr) + alog = openlog(ui.config('web', 'accesslog', '-'), ui.fout) + elog = openlog(ui.config('web', 'errorlog', '-'), ui.ferr) self.accesslog = alog self.errorlog = elog