From a02c32c7a3ffb9cb9cd7e64ed744f7378217afc4 Mon Sep 17 00:00:00 2001 From: Giovanni Santini Date: Sat, 7 Feb 2015 18:01:45 +0100 Subject: Avoid an expected error Running the FastCGI *flup* server launch a ***ValueError*** as the webserver thread does not run as the main one and it can't catch keyboard shut-down commands (ex. CTRL+C). The webserver is stopped properly (should be) by the PyLoad main thread, so the exception is expected. --- module/web/ServerThread.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/web/ServerThread.py b/module/web/ServerThread.py index 84667e5f6..2a8e019ef 100644 --- a/module/web/ServerThread.py +++ b/module/web/ServerThread.py @@ -66,7 +66,10 @@ class WebServer(threading.Thread): if self.server == "fastcgi": - self.start_fcgi() + try + self.start_fcgi() + except ValueError: + pass elif self.server == "threaded": self.start_threaded() elif self.server == "lightweight": -- cgit v1.2.3