[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a
Gerhard Lausser
gerhard.lausser at consol.de
Tue Feb 28 22:15:21 UTC 2012
The following commit has been merged in the debian/master branch:
commit 3fe00ca39ee65d0f89f1f05c617b5de1ea515866
Author: Gerhard Lausser <gerhard.lausser at consol.de>
Date: Sat Jan 21 17:39:40 2012 +0100
Init of livestatus_broker failed in test_modulesmanager. Now initialization is mor erobust
diff --git a/shinken/modules/livestatus_broker/livestatus_broker.py b/shinken/modules/livestatus_broker/livestatus_broker.py
index ec7a514..f3b2b89 100644
--- a/shinken/modules/livestatus_broker/livestatus_broker.py
+++ b/shinken/modules/livestatus_broker/livestatus_broker.py
@@ -61,8 +61,14 @@ class LiveStatus_broker(BaseModule, Daemon):
self.host = getattr(modconf, 'host', '127.0.0.1')
if self.host == '*':
self.host = '0.0.0.0'
- self.port = int(getattr(modconf, 'port', None))
+ self.port = getattr(modconf, 'port', None)
self.socket = getattr(modconf, 'socket', None)
+ if self.port == 'none':
+ self.port = None
+ if self.port:
+ self.port = int(self.port)
+ if self.socket == 'none':
+ self.socket = None
self.allowed_hosts = getattr(modconf, 'allowed_hosts', '')
ips = [ip.strip() for ip in self.allowed_hosts.split(',') if ip]
self.allowed_hosts = [ip for ip in ips if re.match(r'^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$', ip)]
--
UNNAMED PROJECT
More information about the Pkg-nagios-changes
mailing list