build.py fix for differences in string handling in python 2 and python 3

fix #65
This commit is contained in:
Jon Atkins 2013-03-25 16:27:40 +00:00
parent eb3dc21835
commit edd03dcdb6

View File

@ -68,7 +68,7 @@ def loaderRaw(var):
def loaderImage(var):
fn = var.group(1)
return 'data:image/png;base64,{0}'.format(str(base64.encodestring(open(fn, 'rb').read())).replace('\n', ''))
return 'data:image/png;base64,{0}'.format(base64.encodestring(open(fn, 'rb').read()).decode('utf8').replace('\n', ''))
def loadCode(ignore):
return '\n\n'.join(map(readfile, glob.glob('code/*')))