From 860b64f28e46535490adb445a1c576dc912c4e8b Mon Sep 17 00:00:00 2001 From: Stevan Pettit Date: Fri, 3 Jun 2011 11:44:40 -0400 Subject: [PATCH] Fix traceback in windows-builder.py if bzr version string contains non-ascii chars --- scripts/windows-builder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/windows-builder.py b/scripts/windows-builder.py index e99de670b..be9f7d6aa 100644 --- a/scripts/windows-builder.py +++ b/scripts/windows-builder.py @@ -194,7 +194,8 @@ def write_version_file(): code = bzr.wait() if code != 0: 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) f = open(os.path.join(dist_path, u'.version'), u'w') f.write(versionstring)