예제 #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()
예제 #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()
예제 #3
0
 def test_fileName(self):
     try:
         os.environ['FOO'] = 'bar'
         self.assertEqual(util.fileName('~/${FOO}'),
                          os.environ['HOME'] + '/bar')
     finally:
         os.unsetenv('FOO')
예제 #4
0
파일: util_test.py 프로젝트: mikjo/bigitr
 def test_fileName(self):
     try:
         os.environ['FOO'] = 'bar'
         self.assertEqual(util.fileName('~/${FOO}'), os.environ['HOME']+'/bar')
     finally:
         os.unsetenv('FOO')
예제 #5
0
파일: __init__.py 프로젝트: mikjo/bigitr
 def expandFilenameIfString(self, stringish):
     if isinstance(stringish, str):
         return util.fileName(stringish)
     return stringish
예제 #6
0
파일: __init__.py 프로젝트: Mattlk13/bigitr
 def expandFilenameIfString(self, stringish):
     if isinstance(stringish, str):
         return util.fileName(stringish)
     return stringish