コード例 #1
0
ファイル: bigitrdaemon.py プロジェクト: mikjo/bigitr
 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