diff options
author | Shlomi Fish <shlomif@shlomifish.org> | 2015-09-16 21:45:19 +0300 |
---|---|---|
committer | Shlomi Fish <shlomif@shlomifish.org> | 2015-09-16 21:45:19 +0300 |
commit | 040dbeee342a5dfb7fa1bcdceed392903d6fac17 (patch) | |
tree | 4f278b172465d3a16216a2fde8e598aa53ea40db | |
parent | 86ebca48a484122cc692199bb7524dcdb8addf72 (diff) | |
download | bm-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.py | 13 |
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!") |