Patchwork D2294: hgweb: open server logs in binary mode

login
register
mail settings
Submitter phabricator
Date Feb. 17, 2018, 9:54 a.m.
Message ID <4b523d205d2fc1f1c6845999a82705ee@localhost.localdomain>
Download mbox | patch
Permalink /patch/28018/
State Not Applicable
Headers show

Comments

phabricator - Feb. 17, 2018, 9:54 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd527803576b2: hgweb: open server logs in binary mode (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2294?vs=5799&id=5805

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

AFFECTED FILES
  mercurial/hgweb/server.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit
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):