From cb39845ed3a7fc9d2680d203979e98bacacb7650 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Wed, 11 Sep 2013 14:13:45 -0400 Subject: [PATCH] show a prettier error page when the hub is offline --- www/kojiweb/wsgi_publisher.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/kojiweb/wsgi_publisher.py b/www/kojiweb/wsgi_publisher.py index d0c5553a..3f7a5a59 100644 --- a/www/kojiweb/wsgi_publisher.py +++ b/www/kojiweb/wsgi_publisher.py @@ -342,6 +342,11 @@ class Dispatcher(object): values['tb_long'] = tb_long else: values['tb_long'] = "Full tracebacks disabled" + # default these koji values to false so the _genHTML doesn't try to look + # them up (which will fail badly if the hub is offline) + # FIXME - we need a better fix for this + environ['koji.values'].setdefault('mavenEnabled', False) + environ['koji.values'].setdefault('winEnabled', False) result = _genHTML(environ, 'error.chtml') headers = [ ('Allow', 'GET, POST, HEAD'),