diff options
author | Giovanni Santini <giovannisantini93@yahoo.it> | 2015-02-07 18:01:45 +0100 |
---|---|---|
committer | Giovanni Santini <giovannisantini93@yahoo.it> | 2015-02-07 18:01:45 +0100 |
commit | a02c32c7a3ffb9cb9cd7e64ed744f7378217afc4 (patch) | |
tree | 89f463952d9e406c589cb7fca0e4358c73c95583 | |
parent | [ExtractArchive] bump version number after #1152 (diff) | |
download | pyload-a02c32c7a3ffb9cb9cd7e64ed744f7378217afc4.tar.xz |
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.
-rw-r--r-- | module/web/ServerThread.py | 5 |
1 files changed, 4 insertions, 1 deletions
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": |