def __init__(self): """TODO: to be defined1. """ self.cfg = CfgMgr().getConfig() self.base = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../tests/wizzair/testdata/') self.api_version = self.__updateApiVersion() self.__fetchAirportAndConnections()
def __init__(self): self.cfg = CfgMgr().getConfig() self.user = self.cfg["GEO_NAME_PROVIDER"]["user"] self.url_base = "http://api.geonames.org/countryCode?type=JSON&lat={}&lng={}&radius=60&username={}" self.url_base2 = "http://api.geonames.org/searchJSON?name={}&username={}" self.currencyProvider = CurrencyProvider.getCurrencyProvider() self.iataData = IATAProvider().loadData("./data/airports.dat")
def __init__(self): self.cfg = CfgMgr().getConfig() self.flse = FLSearchEngine() self.departure_cities = json.loads( self.cfg['FLIGHT_SEARCH']['departure_cities']) self.arrival_cities = json.loads( self.cfg['FLIGHT_SEARCH']['arrival_cities']) self.search_depth = int(self.cfg['FLIGHT_SEARCH']['search_depth']) self.excluded_cities = json.loads( self.cfg['FLIGHT_SEARCH']['excluded_cities']) self.currencyProvider = CurrencyProvider() # READ CONFIG DATA self.db = DatabaseManager(self.cfg['DATABASE']['name'], self.cfg['DATABASE']['type'], self.cfg['DATABASE']['server'], self.cfg['DATABASE']['pass'], self.cfg['DATABASE']['user']) self.currencyCache = { self.currencyProvider.baseCurrencySymbol: 1, "BAM": 0.46, "RSD": 29.16, "MKD": 14.50, "GEL": 0.64 } self.log_dir = "logs"
def exception(): """TODO: Docstring for getLogger. :module: TODO :returns: TODO """ if CfgMgr().getConfig()['LOGGER']['debug'] == 'on': logHandler.exception("Got exception!")
def debug(log): """TODO: Docstring for getLogger. :module: TODO :returns: TODO """ if CfgMgr().getConfig()['LOGGER']['debug'] == 'on': logHandler.debug(log)
def __init__(self): self.plugins = [] self.asyncDlMgr = DownloadManager.AsyncDownloadManager() self.cfg = CfgMgr().getConfig() # READ CONFIG DATA self.db = DatabaseManager(self.cfg['DATABASE']['name'], self.cfg['DATABASE']['type'], self.cfg['DATABASE']['server'], self.cfg['DATABASE']['pass'], self.cfg['DATABASE']['user'] )
def __init__(self): self.args = self.initArgParser() self.cfg = CfgMgr().getConfig() self.setupLogger(self.cfg['LOGGER'], self.args.debug) self.flydivePluginManager = FLPluginManager() self.flydiveScheduler = FlightScheduler() self.newsletterMgr = NewsletterManager(self.args.config) self.newsletter = FLNewsletter() self.enabled_airlines = []
def __init__(self): self.cfg = CfgMgr().getConfig() self.__fetchAirportAndConnections()
def dump_files(): return CfgMgr().getConfig( )['LOGGER']['debug_files'] == 'on' or _debug_files
def enabled(): return CfgMgr().getConfig()['LOGGER']['debug'] == 'on'
def __init__(self): self.q = queue.Queue() self.cfg = CfgMgr().getConfig() self.workers = int(self.cfg['DOWNLOAD_MANAGER']['workers']) self.mgr = DownloadThread(self.workers, self.q).start()