From 1cfbde0eb469f7d827b73667d7406eddc0065ceb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 17 Nov 2011 04:05:54 +0000 Subject: pass encoding to uses of decode() incase the default isnt utf-8. ignore decode errors in some cases. This should fix an error with generated qtcreator projects. also replace decoded bytes for unicode escape sequences in the VIEW3D_MT_edit_text_chars menu. --- build_files/cmake/project_info.py | 4 +++- build_files/cmake/project_source_info.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'build_files') diff --git a/build_files/cmake/project_info.py b/build_files/cmake/project_info.py index 0b922979a63..7162b324f94 100755 --- a/build_files/cmake/project_info.py +++ b/build_files/cmake/project_info.py @@ -224,7 +224,9 @@ def project_name_get(path, fallback="Blender", prefix="Blender_"): import subprocess info = subprocess.Popen(["svn", "info", path], - stdout=subprocess.PIPE).communicate()[0].decode() + stdout=subprocess.PIPE).communicate()[0] + # string version, we only want the URL + info = info.decode(encoding="utf-8", errors="ignore") for l in info.split("\n"): l = l.strip() diff --git a/build_files/cmake/project_source_info.py b/build_files/cmake/project_source_info.py index 5d646eea2c1..d4b48ccd859 100644 --- a/build_files/cmake/project_source_info.py +++ b/build_files/cmake/project_source_info.py @@ -73,7 +73,7 @@ def do_ignore(filepath, ignore_prefix_list): def makefile_log(): import subprocess import time - # Check blender is not 2.5x until it supports playback again + print("running make with --dry-run ...") process = subprocess.Popen(["make", "--always-make", "--dry-run", "--keep-going", "VERBOSE=1"], stdout=subprocess.PIPE, @@ -85,7 +85,7 @@ def makefile_log(): out = process.stdout.read() process.stdout.close() print("done!", len(out), "bytes") - return out.decode("ascii").split("\n") + return out.decode("utf-8", errors="ignore").split("\n") def build_info(use_c=True, use_cxx=True, ignore_prefix_list=None): -- cgit v1.2.3