diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-02-28 00:04:02 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-02-28 00:04:02 (GMT) |
commit | 90f6531cd593597ba7a1ccc2a5050bf9394b54a2 (patch) | |
tree | 4e8b85aac5a2cc07066d84364dbc3247bd695ae9 /test/AS | |
parent | ba3763414feb40d65e68d478587dea6747bbfb6d (diff) | |
download | SCons-90f6531cd593597ba7a1ccc2a5050bf9394b54a2.zip SCons-90f6531cd593597ba7a1ccc2a5050bf9394b54a2.tar.gz SCons-90f6531cd593597ba7a1ccc2a5050bf9394b54a2.tar.bz2 |
fix byte/str issue
Diffstat (limited to 'test/AS')
-rw-r--r-- | test/AS/ASFLAGS.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/AS/ASFLAGS.py b/test/AS/ASFLAGS.py index 2cc99e3..553ea67 100644 --- a/test/AS/ASFLAGS.py +++ b/test/AS/ASFLAGS.py @@ -89,7 +89,8 @@ infile = open(inf, 'rb') outfile = open(out, 'wb') outfile.write(optstring + "\n") for l in infile.readlines(): - if l[:3] != '#as': + print("LINE->%s<-"%l) + if l[:3] != bytearray('#as'): outfile.write(l) sys.exit(0) """) @@ -108,7 +109,7 @@ for opt, arg in opts: infile = open(args[0], 'rb') outfile = open(out, 'wb') for l in infile.readlines(): - if l[:5] != '#link': + if l[:5] != b'#link': outfile.write(l) sys.exit(0) """) @@ -118,15 +119,19 @@ import getopt import sys opts, args = getopt.getopt(sys.argv[1:], 'co:x') optstring = '' + for opt, arg in opts: if opt == '-o': out = arg else: optstring = optstring + ' ' + opt + infile = open(args[0], 'rb') outfile = open(out, 'wb') -outfile.write(optstring + "\n") +outfile.write(bytearray(optstring + "\n",'utf-8')) + for l in infile.readlines(): - if l[:3] != '#as': + if l[:3] != b'#as': outfile.write(l) + sys.exit(0) """) |