From 4160673c3a5f853d01a7e5de299e643d3561d7d3 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Tue, 15 Jan 2019 14:50:06 +0100 Subject: [PATCH] Correctly raise StopBuild in case of error when building flatpak. --- kiwixbuild/flatpak_builder.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/kiwixbuild/flatpak_builder.py b/kiwixbuild/flatpak_builder.py index 1fb2c0a..bc0c727 100644 --- a/kiwixbuild/flatpak_builder.py +++ b/kiwixbuild/flatpak_builder.py @@ -208,12 +208,9 @@ class FlatpakBuilder: run_command(command, self.platform.buildEnv.build_dir, context, self.platform.buildEnv) context._finalise() except subprocess.CalledProcessError: - try: - with open(log, 'r') as f: - print(f.read()) - raise StopBuild() - except: - pass + with open(log, 'r') as f: + print(f.read()) + raise StopBuild() def bundle(self): log = pj(self.platform.buildEnv.log_dir, 'cmd_bundle_flatpak.log') @@ -224,12 +221,9 @@ class FlatpakBuilder: run_command(command, self.platform.buildEnv.build_dir, context, self.platform.buildEnv) context._finalise() except subprocess.CalledProcessError: - try: - with open(log, 'r') as f: - print(f.read()) - raise StopBuild() - except: - pass + with open(log, 'r') as f: + print(f.read()) + raise StopBuild() def _get_packages(self):