Patchwork D3725: tests: fix printenv script on Python 3

login
register
mail settings
Submitter phabricator
Date June 13, 2018, 1:09 a.m.
Message ID <differential-rev-PHID-DREV-ydrpdubjcazknc3sfyvu-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/32101/
State Superseded
Headers show

Comments

phabricator - June 13, 2018, 1:09 a.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/printenv.py

CHANGE DETAILS




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

Patch

diff --git a/tests/printenv.py b/tests/printenv.py
--- a/tests/printenv.py
+++ b/tests/printenv.py
@@ -26,6 +26,7 @@ 
 
 exitcode = 0
 out = sys.stdout
+out = getattr(out, 'buffer', out)
 
 name = sys.argv[1]
 if len(sys.argv) > 2: