Correctly raise StopBuild in case of error when building flatpak.

This commit is contained in:
Matthieu Gautier 2019-01-15 14:50:06 +01:00
parent c4a3da03c3
commit 4160673c3a
1 changed files with 6 additions and 12 deletions

View File

@ -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):