Patchwork D2519: py3: make sure we write bytes in a file open in bytes mode

login
register
mail settings
Submitter phabricator
Date March 1, 2018, 6:49 p.m.
Message ID <differential-rev-PHID-DREV-prisac4dxi4novupjdvl-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/28571/
State Superseded
Headers show

Comments

phabricator - March 1, 2018, 6:49 p.m.
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  1. skip-blame just b'' prefix

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-grep.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-grep.t b/tests/test-grep.t
--- a/tests/test-grep.t
+++ b/tests/test-grep.t
@@ -271,7 +271,7 @@ 
 
 match in last "line" without newline
 
-  $ $PYTHON -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();'
+  $ $PYTHON -c 'fp = open("noeol", "wb"); fp.write(b"no infinite loop"); fp.close();'
   $ hg ci -Amnoeol
   adding noeol
   $ hg grep loop