Fix traceback in windows-builder.py if bzr version string contains non-ascii chars

This commit is contained in:
Stevan Pettit 2011-06-03 11:44:40 -04:00
parent 59f520ab6c
commit 860b64f28e

View File

@ -194,7 +194,8 @@ def write_version_file():
code = bzr.wait() code = bzr.wait()
if code != 0: if code != 0:
raise Exception(u'Error running bzr log') raise Exception(u'Error running bzr log')
latest = output.split(u':')[0] outputAscii = unicode(output, errors='ignore')
latest = outputAscii.split(u':')[0]
versionstring = latest == revision and tag or u'%s-bzr%s' % (tag, latest) versionstring = latest == revision and tag or u'%s-bzr%s' % (tag, latest)
f = open(os.path.join(dist_path, u'.version'), u'w') f = open(os.path.join(dist_path, u'.version'), u'w')
f.write(versionstring) f.write(versionstring)