def __init__(self): Daemon.__init__( self, get_embedded_filename(mail_config), secret_key, installation_path, directory, catcher)
def __init__(self): self.start_time = time.time() self.max_life = 86400 # 24 hours in seconds self.last_run = 0 Daemon.__init__( self, get_embedded_filename(mail_config), secret_key, installation_path, directory, catcher) self.file_cleaner = FileCleaner('/etc/hosts', get_notifier())
def test_parse_config_file(self): """ Test parsing the configuration, when it exists. """ mock_file = self.mox.CreateMockAnything() mock_file.name = "xmppmoterc" self.mox.StubOutWithMock(__builtin__, "open") self.mox.StubOutWithMock(ConfigurationParser, "parse") self.mox.StubOutWithMock(xmppmoted.XMPPMoteDaemon, "_XMPPMoteDaemon__get_pidfile") self.mox.StubOutWithMock(Daemon, "__init__") config = ConfigurationParser() open("xmppmoterc", "a+").AndReturn(mock_file) config.parse(mock_file) xmppmoted.XMPPMoteDaemon._XMPPMoteDaemon__get_pidfile().AndReturn(None) Daemon.__init__(mox.IgnoreArg(), None) self.mox.ReplayAll() daemon = xmppmoted.XMPPMoteDaemon()
def __init__(self, pidfile, stdout='/dev/null', stderr='/dev/null', stdin='/dev/null', cwd='/'): Daemon.__init__(self, pidfile, stdout, stderr, stdin) self.cwd=cwd
def __init__(self): self.__usr = self.__pwd = None self.__parse_config_file() Daemon.__init__(self, self.__get_pidfile())
def __init__(self, cfg): self._cfg = cfg Daemon.__init__(self, self._cfg['pid_path']) self._logger = get_logger('snoopy-collector')