コード例 #1
0
ファイル: admin.py プロジェクト: DKILLER123/seedbox
def load_passfile():

    service.prepare_service([])

    pwfile = cfg.CONF.find_file('.admin_pass')
    if not pwfile:
        pwfile = os.path.join(cfg.CONF.config_dir, '.admin_pass')
    return pwfile
コード例 #2
0
ファイル: cli.py プロジェクト: DKILLER123/seedbox
def main():
    """Entry point for seedmgr"""

    # processes all command-line inputs that control how we execute
    # logging, run mode, etc.; and we get a handle back to access
    # the info
    service.prepare_service()

    # time to start processing
    process.start()
コード例 #3
0
ファイル: test_service.py プロジェクト: DKILLER123/seedbox
    def test_prepare_service(self):

        cfg.CONF.reset()
        cfg.CONF.import_opt('base_client_path', 'seedbox.options')

        with fixtures.EnvironmentVariable('VIRTUAL_ENV'):
            cfgfile = self.create_tempfiles(
                [(os.path.join(os.path.expanduser('~'),
                               'seedbox'),
                    ''.join(self.cfg_data))])[0]
            self.addCleanup(shutil.rmtree, os.path.dirname(cfgfile), True)
            service.prepare_service([])

        self.assertEqual(logging.getLogger('sqlalchemy').getEffectiveLevel(),
                         logging.ERROR)
        self.assertEqual(cfg.CONF.base_client_path,
                         '/home/shad/torrent-test/deluge')