From e5dea5884a04926aa7f08091b8197e3be1e83d7c Mon Sep 17 00:00:00 2001 From: Simon Pamies Date: Mon, 13 Jun 2011 09:27:12 +0200 Subject: [PATCH] Yield error when there is no thread running --- python/src/sailing.web/sailing/web/browser/functions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/src/sailing.web/sailing/web/browser/functions.py b/python/src/sailing.web/sailing/web/browser/functions.py index a93c497c176..98aefa4584e 100644 --- a/python/src/sailing.web/sailing/web/browser/functions.py +++ b/python/src/sailing.web/sailing/web/browser/functions.py @@ -461,6 +461,9 @@ def adminLiveData(context, request): # always show the last leg currentlegs.insert(0, currentlegs[0]-1) + if len(threaded_listener.values()) == 0: + return 'The listener does not seem to be started properly. Please reconfigure your connection!' + t_up = threaded_listener.values()[0].last_update.strftime('%H:%M:%S') t_upcount = threaded_listener.values()[0].updatecount