Patchwork D2294: hgweb: open server logs in binary mode

login
register
mail settings
Submitter phabricator
Date Feb. 17, 2018, 6:41 a.m.
Message ID <differential-rev-PHID-DREV-og4wt6sidbks4fe3tcty-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28012/
State Superseded
Headers show

Comments

phabricator - Feb. 17, 2018, 6:41 a.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This is consistent with when we're logging to stdout, so we don't have
  to do something annoyingly complicated in the logging infrastructure.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2294

AFFECTED FILES
  mercurial/hgweb/server.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/hgweb/server.py b/mercurial/hgweb/server.py
--- a/mercurial/hgweb/server.py
+++ b/mercurial/hgweb/server.py
@@ -273,7 +273,7 @@ 
 
 def openlog(opt, default):
     if opt and opt != '-':
-        return open(opt, 'a')
+        return open(opt, 'ab')
     return default
 
 class MercurialHTTPServer(_mixin, httpservermod.httpserver, object):