tests: fix printenv script on Python 3
authorAugie Fackler <augie@google.com>
Tue, 12 Jun 2018 18:49:35 -0400
changeset 38296 42f3a277c8dc
parent 38295 bec815f991b0
child 38297 9f499d28efb4
tests: fix printenv script on Python 3 Differential Revision: https://phab.mercurial-scm.org/D3725
tests/printenv.py
--- a/tests/printenv.py	Tue Jun 12 18:49:22 2018 -0400
+++ b/tests/printenv.py	Tue Jun 12 18:49:35 2018 -0400
@@ -26,6 +26,7 @@
 
 exitcode = 0
 out = sys.stdout
+out = getattr(out, 'buffer', out)
 
 name = sys.argv[1]
 if len(sys.argv) > 2: