[llvm-commits] [zorg] r147166 - /zorg/trunk/lnt/lnt/server/ui/views.py
Daniel Dunbar
daniel at zuster.org
Thu Dec 22 11:24:36 PST 2011
Author: ddunbar
Date: Thu Dec 22 13:24:36 2011
New Revision: 147166
URL: http://llvm.org/viewvc/llvm-project?rev=147166&view=rev
Log:
[lnt/v0.4] lnt.server.ui/v4: Fix a few views to more appropriately return 404 instead of crashing.
Modified:
zorg/trunk/lnt/lnt/server/ui/views.py
Modified: zorg/trunk/lnt/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/server/ui/views.py?rev=147166&r1=147165&r2=147166&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/server/ui/views.py (original)
+++ zorg/trunk/lnt/lnt/server/ui/views.py Thu Dec 22 13:24:36 2011
@@ -642,7 +642,9 @@
def v4_report(id):
db = request.get_db()
ts = request.get_testsuite()
- run = ts.getRun(id)
+ run = ts.query(ts.Run).filter_by(id=id).first()
+ if run is None:
+ abort(404)
_, _, html_report = NTEmailReport.getReport(
result=None, db=db, run=run,
@@ -655,7 +657,9 @@
def v4_text_report(id):
db = request.get_db()
ts = request.get_testsuite()
- run = ts.getRun(id)
+ run = ts.query(ts.Run).filter_by(id=id).first()
+ if run is None:
+ abort(404)
_, text_report, _ = NTEmailReport.getReport(
result=None, db=db, run=run,
@@ -670,7 +674,9 @@
def v4_run(id):
db = request.get_db()
ts = request.get_testsuite()
- run = ts.getRun(id)
+ run = ts.query(ts.Run).filter_by(id=id).first()
+ if run is None:
+ abort(404)
# Find the neighboring runs, by order.
prev_runs = list(ts.get_previous_runs_on_machine(run, N = 3))
More information about the llvm-commits
mailing list