From 20010fb0a4e04c53c1d2bb233316658131efbf94 Mon Sep 17 00:00:00 2001 From: Ferry Boender Date: Wed, 17 Jun 2015 08:12:32 +0200 Subject: [PATCH] Raise 404 error instead of sending it directly. --- src/webapp.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/webapp.py b/src/webapp.py index ba284ed..f8a929e 100644 --- a/src/webapp.py +++ b/src/webapp.py @@ -204,9 +204,7 @@ class WebAppHandler(BaseHTTPRequestHandler): elif hasattr(self, 'default'): method_cb = getattr(self, 'default') else: - # FIXME: Raise Error - self.send_error(404, "Not found") - return + raise HTTPError(404, "Not found") method_cb(**params) except HTTPError, e: if e.status_code not in (401, ):