From 2b41dffcb292500e5e96e8474d3645b6d79c7689 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Tue, 7 Sep 2021 16:17:56 +0200 Subject: [PATCH] Provide verbose output with --verbose 23b0b6bc added logging in case of an FDroidException on the build server. This broke the log of apps that fail to build. Prior to 23b0b6bc a failing build in the VM triggered a BuildException on the server side but the build output was written to the log in the finally part of build_server(). After 23b0b6bc the finally part writs the build as well but the BuildException is caught in main() and the build log is overwritten with the empty exception content. This patch always adds the build log to the exception so it is written to the log. Closes: #882 --- fdroidserver/build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdroidserver/build.py b/fdroidserver/build.py index 37cc6989..9e6b2f36 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -266,7 +266,7 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force): else: message = "Build.py failed on server for {0}:{1}" raise BuildException(message.format(app.id, build.versionName), - None if options.verbose else str(output, 'utf-8')) + str(output, 'utf-8')) # Retreive logs... toolsversion_log = common.get_toolsversion_logname(app, build) @@ -292,7 +292,7 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force): except Exception: raise BuildException( "Build failed for {0}:{1} - missing output files".format( - app.id, build.versionName), None if options.verbose else str(output, 'utf-8')) + app.id, build.versionName), str(output, 'utf-8')) ftp.close() finally: