mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 19:10:11 +01:00
fix exception handling in build.py
This commit is contained in:
parent
bb49123118
commit
83fe2bda4d
@ -431,8 +431,8 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
|
|||||||
ftp.chdir(os.path.join(homedir, log_dir))
|
ftp.chdir(os.path.join(homedir, log_dir))
|
||||||
ftp.get(toolsversion_log, os.path.join(log_dir, toolsversion_log))
|
ftp.get(toolsversion_log, os.path.join(log_dir, toolsversion_log))
|
||||||
logging.debug('retrieved %s', toolsversion_log)
|
logging.debug('retrieved %s', toolsversion_log)
|
||||||
except:
|
except Exception as e:
|
||||||
logging.warn('could not get %s from builder vm.' % (toolsversion_log))
|
logging.warn('could not get %s from builder vm: %s' % (toolsversion_log, e))
|
||||||
|
|
||||||
# Retrieve the built files...
|
# Retrieve the built files...
|
||||||
logging.info("Retrieving build output...")
|
logging.info("Retrieving build output...")
|
||||||
@ -446,7 +446,7 @@ def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
|
|||||||
ftp.get(apkfile, os.path.join(output_dir, apkfile))
|
ftp.get(apkfile, os.path.join(output_dir, apkfile))
|
||||||
if not options.notarball:
|
if not options.notarball:
|
||||||
ftp.get(tarball, os.path.join(output_dir, tarball))
|
ftp.get(tarball, os.path.join(output_dir, tarball))
|
||||||
except:
|
except Exception:
|
||||||
raise BuildException(
|
raise BuildException(
|
||||||
"Build failed for %s:%s - missing output files".format(
|
"Build failed for %s:%s - missing output files".format(
|
||||||
app.id, build.versionName), output)
|
app.id, build.versionName), output)
|
||||||
@ -1268,8 +1268,8 @@ def main():
|
|||||||
# Redirect from /lastbuild to the most recent build log
|
# Redirect from /lastbuild to the most recent build log
|
||||||
newpage = site.Pages[appid + '/lastbuild']
|
newpage = site.Pages[appid + '/lastbuild']
|
||||||
newpage.save('#REDIRECT [[' + lastbuildpage + ']]', summary='Update redirect')
|
newpage.save('#REDIRECT [[' + lastbuildpage + ']]', summary='Update redirect')
|
||||||
except:
|
except Exception as e:
|
||||||
logging.error("Error while attempting to publish build log")
|
logging.error("Error while attempting to publish build log: %s" % e)
|
||||||
|
|
||||||
for app in build_succeeded:
|
for app in build_succeeded:
|
||||||
logging.info("success: %s" % (app.id))
|
logging.info("success: %s" % (app.id))
|
||||||
|
Loading…
Reference in New Issue
Block a user