changeset 30278:dd3dd80fca10

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.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 28 Jun 2014 13:13:32 +0900
parents 7f2313450e86
children 6a8aff737a17
files mercurial/hgweb/server.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/server.py	Mon Feb 29 13:41:54 2016 +0900
+++ b/mercurial/hgweb/server.py	Sat Jun 28 13:13:32 2014 +0900
@@ -281,8 +281,8 @@
             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