diff --git a/rattail_tempmon/server.py b/rattail_tempmon/server.py index 1968782..f5ef640 100644 --- a/rattail_tempmon/server.py +++ b/rattail_tempmon/server.py @@ -246,15 +246,20 @@ class TempmonServerDaemon(Daemon): timeout = probe.timeout_for_status(status) if timeout is None: if status == self.enum.TEMPMON_PROBE_STATUS_CRITICAL_HIGH_TEMP: - timeout = self.config.getint('rattail_tempmon', 'probe.default.critical_max_timeout') + timeout = self.config.getint('rattail_tempmon', 'probe.default.critical_max_timeout', + default=0) elif status == self.enum.TEMPMON_PROBE_STATUS_HIGH_TEMP: - timeout = self.config.getint('rattail_tempmon', 'probe.default.good_max_timeout') + timeout = self.config.getint('rattail_tempmon', 'probe.default.good_max_timeout', + default=0) elif status == self.enum.TEMPMON_PROBE_STATUS_LOW_TEMP: - timeout = self.config.getint('rattail_tempmon', 'probe.default.good_min_timeout') + timeout = self.config.getint('rattail_tempmon', 'probe.default.good_min_timeout', + default=0) elif status == self.enum.TEMPMON_PROBE_STATUS_CRITICAL_LOW_TEMP: - timeout = self.config.getint('rattail_tempmon', 'probe.default.critical_min_timeout') + timeout = self.config.getint('rattail_tempmon', 'probe.default.critical_min_timeout', + default=0) elif status == self.enum.TEMPMON_PROBE_STATUS_ERROR: - timeout = self.config.getint('rattail_tempmon', 'probe.default.error_timeout') + timeout = self.config.getint('rattail_tempmon', 'probe.default.error_timeout', + default=0) timeout = datetime.timedelta(minutes=timeout or 0) started = probe.status_started(status) or probe.status_changed if (self.now - started) <= timeout: