[SCM] build.samba.org - branch master updated

Jelmer Vernooij jelmer at samba.org
Sat Mar 10 10:53:30 MST 2012


The branch, master has been updated
       via  a5112ec Print 404 page if build is not found.
      from  87b42eb Add tdb2 build

http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a5112ec54a329d996a9772cdfad5f5357296bfc2
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Mar 10 18:53:43 2012 +0100

    Print 404 page if build is not found.

-----------------------------------------------------------------------

Summary of changes:
 buildfarm/web/__init__.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildfarm/web/__init__.py b/buildfarm/web/__init__.py
index c4972dc..f6444dc 100755
--- a/buildfarm/web/__init__.py
+++ b/buildfarm/web/__init__.py
@@ -1030,7 +1030,13 @@ class BuildFarmApp(object):
                 yield "".join(self.html_page(form, page.render_html(myself, wsgiref.util.shift_path_info(environ))))
             elif fn == "build":
                 build_checksum = wsgiref.util.shift_path_info(environ)
-                build = self.buildfarm.builds.get_by_checksum(build_checksum)
+                try:
+                    build = self.buildfarm.builds.get_by_checksum(build_checksum)
+                except NoSuchBuildError:
+                    start_response('404 Page Not Found', [
+                        ('Content-Type', 'text/html; charset=utf8')])
+                    yield "No build with checksum %s found" % build_checksum
+                    return
                 page = ViewBuildPage(self.buildfarm)
                 subfn = wsgiref.util.shift_path_info(environ)
                 if subfn == "+plain":


-- 
build.samba.org


More information about the samba-cvs mailing list