[cfe-commits] r56422 - /cfe/trunk/tools/scan-view/ScanView.py
Daniel Dunbar
daniel at zuster.org
Sun Sep 21 18:40:14 PDT 2008
Author: ddunbar
Date: Sun Sep 21 20:40:14 2008
New Revision: 56422
URL: http://llvm.org/viewvc/llvm-project?rev=56422&view=rev
Log:
scan-view tweaks
- Use more correct HTTP error codes on (unexpected) errors.
- Use onLoad to set ensure bug submission method gets set correctly.
Modified:
cfe/trunk/tools/scan-view/ScanView.py
Modified: cfe/trunk/tools/scan-view/ScanView.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/scan-view/ScanView.py?rev=56422&r1=56421&r2=56422&view=diff
==============================================================================
--- cfe/trunk/tools/scan-view/ScanView.py (original)
+++ cfe/trunk/tools/scan-view/ScanView.py Sun Sep 21 20:40:14 2008
@@ -176,9 +176,6 @@
self.copyfile(f, self.wfile)
f.close()
- def send_internal_error(self, message):
- return self.send_string('ERROR: %s'%(message,), 'text/plain')
-
def submit_bug(self):
title = self.fields.get('title')
description = self.fields.get('description')
@@ -278,7 +275,7 @@
try:
keys = self.load_report(report)
except IOError:
- return self.send_internal_error('Invalid report.')
+ return self.send_error(400, 'Invalid report.')
initialTitle = keys.get('DESC','')
initialDescription = """\
@@ -338,7 +335,7 @@
}
}
</script>
-<body>
+<body onLoad="updateReporterOptions()">
<h1>File Report</h1>
<form name="form" action="/report_submit" method="post">
<input type="hidden" name="report" value="%(report)s">
@@ -478,7 +475,10 @@
return StringIO.StringIO(s)
def send_patched_file(self, path, ctype):
- f = open(path,'r')
+ try:
+ f = open(path,'r')
+ except IOError:
+ return self.send_404()
fs = os.fstat(f.fileno())
data = f.read()
for a,b in kReportReplacements:
More information about the cfe-commits
mailing list