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
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()
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')