summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wallace/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/wallace/__init__.py b/wallace/__init__.py
index ddb4256..7ca3d59 100644
--- a/wallace/__init__.py
+++ b/wallace/__init__.py
@@ -103,6 +103,7 @@ class WallaceDaemon(object):
def __init__(self):
self.current_connections = 0
self.max_connections = 24
+ self.pool = None
daemon_group = conf.add_cli_parser_option_group(_("Daemon Options"))
@@ -335,8 +336,9 @@ class WallaceDaemon(object):
if os.access(conf.pidfile, os.R_OK):
os.remove(conf.pidfile)
- self.pool.close()
- self.pool.join()
+ if self.pool is not None:
+ self.pool.close()
+ self.pool.join()
raise SystemExit