summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShlomi Fish <shlomif@shlomifish.org>2015-09-16 21:45:19 +0300
committerShlomi Fish <shlomif@shlomifish.org>2015-09-16 21:45:19 +0300
commit040dbeee342a5dfb7fa1bcdceed392903d6fac17 (patch)
tree4f278b172465d3a16216a2fde8e598aa53ea40db
parent86ebca48a484122cc692199bb7524dcdb8addf72 (diff)
downloadbm-040dbeee342a5dfb7fa1bcdceed392903d6fac17.tar
bm-040dbeee342a5dfb7fa1bcdceed392903d6fac17.tar.gz
bm-040dbeee342a5dfb7fa1bcdceed392903d6fac17.tar.bz2
bm-040dbeee342a5dfb7fa1bcdceed392903d6fac17.tar.xz
bm-040dbeee342a5dfb7fa1bcdceed392903d6fac17.zip
Apply patch for crash due to invalid chars.
-rw-r--r--BuildManager/build.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/BuildManager/build.py b/BuildManager/build.py
index fa578cf..c07126e 100644
--- a/BuildManager/build.py
+++ b/BuildManager/build.py
@@ -212,11 +212,14 @@ def buildpkg(pkg, stage, unpack_dir, passtrough="", show_log=0, dryrun=0):
status = pop.poll()
if status is not None:
break
- data = os.read(of, 8192).decode(sys.getfilesystemencoding())
- log.write(data)
- log.flush()
- if show_log:
- sys.stdout.write(data)
+ try:
+ data = os.read(of, 8192).decode(sys.getfilesystemencoding())
+ log.write(data)
+ log.flush()
+ if show_log:
+ sys.stdout.write(data)
+ except UnicodeDecodeError:
+ pass
log.close()
if status == 0:
logger.info("succeeded!")