diff --git a/WebStats/plugin.py b/WebStats/plugin.py index 6716e4c..1885a5f 100644 --- a/WebStats/plugin.py +++ b/WebStats/plugin.py @@ -107,7 +107,7 @@ class HTTPHandler(BaseHTTPServer.BaseHTTPRequestHandler): response = 404 content_type = 'text/html' output = getTemplate('error404').get(not testing) - except Exception as e: + except FooException as e: response = 500 content_type = 'text/html' if output == '': @@ -327,7 +327,10 @@ class WebStatsDB: cursor = self._conn.cursor() cursor.execute(query, (chanName, index)) try: - results.update({index: cursor.fetchone()}) + row = cursor.fetchone() + if row is None: + raise Exception() + results.update({index: row}) except: self._addKeyInTmpCacheIfDoesNotExist(results, index) cursor.close() diff --git a/WebStats/templates/design.py b/WebStats/templates/design.py index 21b4a9d..5e7d8ef 100644 --- a/WebStats/templates/design.py +++ b/WebStats/templates/design.py @@ -99,6 +99,8 @@ table { position: absolute; width: 100px; text-align: center; + margin-top: auto; + margin-bottom: auto; } """