summaryrefslogtreecommitdiff
path: root/test/DVIPDF
diff options
context:
space:
mode:
authorCraig Rodrigues <rodrigc@FreeBSD.org>2017-03-12 16:21:07 -0700
committerCraig Rodrigues <rodrigc@FreeBSD.org>2017-03-12 16:21:07 -0700
commit5ce132ca7262c7d45d76fa786e1071e3187ff4c8 (patch)
tree61f648bdc234084da9d784ce206edf332f979e4d /test/DVIPDF
parent2d3eb8a9eea0691fcc7bf40a14ecf01d3b36df46 (diff)
downloadscons-5ce132ca7262c7d45d76fa786e1071e3187ff4c8.tar.gz
Fix some bytes/str issues to fix py2/3.
Diffstat (limited to 'test/DVIPDF')
-rw-r--r--test/DVIPDF/DVIPDFFLAGS.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/DVIPDF/DVIPDFFLAGS.py b/test/DVIPDF/DVIPDFFLAGS.py
index 51a4c42a..3704d604 100644
--- a/test/DVIPDF/DVIPDFFLAGS.py
+++ b/test/DVIPDF/DVIPDFFLAGS.py
@@ -55,7 +55,7 @@ base_name = os.path.splitext(arg[0])[0]
infile = open(arg[0], 'r')
out_file = open(base_name+'.dvi', 'w')
for l in infile.readlines():
- if l[:6] != '#latex':
+ if l[:6] != b'#latex':
out_file.write(l)
sys.exit(0)
""")
@@ -114,7 +114,7 @@ if dvipdf and tex:
test.write("wrapper.py", """import os
import sys
cmd = " ".join(sys.argv[1:])
-open('%s', 'ab').write("%%s\\n" %% cmd)
+open('%s', 'a').write("%%s\\n" %% cmd)
os.system(cmd)
""" % test.workpath('wrapper.out').replace('\\', '\\\\'))