Exemplo n.º 1
0
 def __init__(self, execPath, config, detach, pidfile):
     self.execPath = execPath
     self.config = util.fileName(config)
     self.cfg = daemonconfig.DaemonConfig(config)
     self.pidfile = util.fileName(pidfile)
     self.restart = False
     self.stop = False
     if detach:
         self.progress = progress.Progress(outFile=None)
     else:
         self.progress = progress.Progress()
     self.createContext(detach)
     self.createSynchronizers()
Exemplo n.º 2
0
 def __init__(self, execPath, config, detach, pidfile):
     self.execPath = execPath
     self.config = util.fileName(config)
     self.cfg = daemonconfig.DaemonConfig(config)
     self.pidfile = util.fileName(pidfile)
     self.restart = False
     self.stop = False
     if detach:
         self.progress = progress.Progress(outFile=None)
     else:
         self.progress = progress.Progress()
     self.createContext(detach)
     self.createSynchronizers()
Exemplo n.º 3
0
 def test_fileName(self):
     try:
         os.environ['FOO'] = 'bar'
         self.assertEqual(util.fileName('~/${FOO}'),
                          os.environ['HOME'] + '/bar')
     finally:
         os.unsetenv('FOO')
Exemplo n.º 4
0
 def test_fileName(self):
     try:
         os.environ['FOO'] = 'bar'
         self.assertEqual(util.fileName('~/${FOO}'), os.environ['HOME']+'/bar')
     finally:
         os.unsetenv('FOO')
Exemplo n.º 5
0
 def expandFilenameIfString(self, stringish):
     if isinstance(stringish, str):
         return util.fileName(stringish)
     return stringish
Exemplo n.º 6
0
 def expandFilenameIfString(self, stringish):
     if isinstance(stringish, str):
         return util.fileName(stringish)
     return stringish