From 598439410d709dbfacec13c833e1461f4bec5316 Mon Sep 17 00:00:00 2001 From: William Deegan Date: Mon, 27 Feb 2017 20:40:12 -0800 Subject: Fix py2/3 byte file issue --- test/Alias/action.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Alias/action.py b/test/Alias/action.py index 74eb6f9..2a10dbc 100644 --- a/test/Alias/action.py +++ b/test/Alias/action.py @@ -43,12 +43,12 @@ def cat(target, source, env): def foo(target, source, env): target = list(map(str, target)) source = list(map(str, source)) - open('foo', 'wb').write("foo(%s, %s)\\n" % (target, source)) + open('foo', 'wb').write(bytearray("foo(%s, %s)\\n" % (target, source),'utf-8')) def bar(target, source, env): target = list(map(str, target)) source = list(map(str, source)) - open('bar', 'wb').write("bar(%s, %s)\\n" % (target, source)) + open('bar', 'wb').write(bytearray("bar(%s, %s)\\n" % (target, source),'utf-8')) env = Environment(BUILDERS = {'Cat':Builder(action=cat)}) env.Alias(target = ['build-f1'], source = 'f1.out', action = foo) -- cgit v0.12