From efa92b3c4b907d40b6f51463741b1af7b496b9b4 Mon Sep 17 00:00:00 2001 From: shibdib Date: Fri, 18 Jan 2019 01:54:06 -0500 Subject: [PATCH 1/2] set db logging to debug level --- firetail/lib/db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/firetail/lib/db.py b/firetail/lib/db.py index 09818d2..46e5d9b 100644 --- a/firetail/lib/db.py +++ b/firetail/lib/db.py @@ -47,9 +47,9 @@ def get_db(): @wraps(func) async def access_control(*args, db=None, **kwargs): - logger.info('Waiting for db access.') + logger.debug('Waiting for db access.') async with LOCK: - logger.info('Aquired db access.') + logger.debug('Aquired db access.') if not db: db = get_db() try: @@ -59,7 +59,7 @@ async def access_control(*args, db=None, **kwargs): return None finally: db.close() - logger.info('Closed db.') + logger.debug('Closed db.') return access_control From 1e64dea9a44db77d300854e7dbbc2f49db7d5b41 Mon Sep 17 00:00:00 2001 From: shibdib Date: Fri, 18 Jan 2019 01:57:43 -0500 Subject: [PATCH 2/2] fix some old esi links --- firetail/extensions/char_lookup/char_lookup.py | 6 +++--- firetail/extensions/location_scout/location_scout.py | 6 +++--- firetail/extensions/sov_tracker/sov_tracker.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/firetail/extensions/char_lookup/char_lookup.py b/firetail/extensions/char_lookup/char_lookup.py index 1664a20..704f461 100644 --- a/firetail/extensions/char_lookup/char_lookup.py +++ b/firetail/extensions/char_lookup/char_lookup.py @@ -170,7 +170,7 @@ async def zkill_last_mail(self, character_id): async with session.get(url) as resp: data = await resp.text() data = json.loads(data) - kill_esi_url = 'https://esi.tech.ccp.is/latest/killmails/{}/{}/'.format( + kill_esi_url = 'https://esi.evetech.net/latest/killmails/{}/{}/'.format( data[0]['killmail_id'], data[0]['zkb']['hash']) async with session.get(kill_esi_url) as kill_resp: data = await kill_resp.text() @@ -261,7 +261,7 @@ async def character_type(self, character_id, solo, threat): i = i + 1 if i >= 50: break - loss_esi_url = 'https://esi.tech.ccp.is/latest/killmails/{}/{}/'.format( + loss_esi_url = 'https://esi.evetech.net/latest/killmails/{}/{}/'.format( loss['killmail_id'], loss['zkb']['hash']) async with session.get(loss_esi_url) as data: loss_data = await data.text() @@ -321,7 +321,7 @@ async def last_kill(self, kill_url): data = await resp.text() data = json.loads(data) try: - kill_esi_url = 'https://esi.tech.ccp.is/latest/killmails/{}/{}/'.format( + kill_esi_url = 'https://esi.evetech.net/latest/killmails/{}/{}/'.format( data[0]['killmail_id'], data[0]['zkb']['hash']) async with session.get(kill_esi_url) as kill_resp: data = await kill_resp.text() diff --git a/firetail/extensions/location_scout/location_scout.py b/firetail/extensions/location_scout/location_scout.py index 5318d50..7c49032 100644 --- a/firetail/extensions/location_scout/location_scout.py +++ b/firetail/extensions/location_scout/location_scout.py @@ -321,7 +321,7 @@ async def format_region(self, ctx, data): async def get_kill_info(self, system_id): async with aiohttp.ClientSession() as session: async with session.get( - 'https://esi.tech.ccp.is/latest/universe/system_kills/?datasource=tranquility') as resp: + 'https://esi.evetech.net/latest/universe/system_kills/?datasource=tranquility') as resp: data = await resp.text() data = json.loads(data) ship_kills = 0 @@ -338,7 +338,7 @@ async def get_kill_info(self, system_id): async def get_sov_info(self, system_id): async with aiohttp.ClientSession() as session: async with session.get( - 'https://esi.tech.ccp.is/latest/sovereignty/map/?datasource=tranquility') as resp: + 'https://esi.evetech.net/latest/sovereignty/map/?datasource=tranquility') as resp: data = await resp.text() data = json.loads(data) sov_alliance_id = 1 @@ -360,7 +360,7 @@ async def get_sov_info(self, system_id): async def group_name(self, group_id): async with aiohttp.ClientSession() as session: async with session.get( - 'https://esi.tech.ccp.is/latest/alliances/{}/?datasource=tranquility'.format(group_id)) as resp: + 'https://esi.evetech.net/latest/alliances/{}/?datasource=tranquility'.format(group_id)) as resp: data = await resp.text() data = json.loads(data) try: diff --git a/firetail/extensions/sov_tracker/sov_tracker.py b/firetail/extensions/sov_tracker/sov_tracker.py index 401e355..798cebd 100644 --- a/firetail/extensions/sov_tracker/sov_tracker.py +++ b/firetail/extensions/sov_tracker/sov_tracker.py @@ -255,7 +255,7 @@ async def remove(self, ctx, location): async def get_sov_info(self, system_id): async with aiohttp.ClientSession() as session: async with session.get( - 'https://esi.tech.ccp.is/latest/sovereignty/map/?datasource=tranquility') as resp: + 'https://esi.evetech.net/latest/sovereignty/map/?datasource=tranquility') as resp: data = await resp.text() data = json.loads(data) sov_alliance_id = 1 @@ -277,7 +277,7 @@ async def get_sov_info(self, system_id): async def group_name(self, group_id): async with aiohttp.ClientSession() as session: async with session.get( - 'https://esi.tech.ccp.is/latest/alliances/{}/?datasource=tranquility'.format(group_id)) as resp: + 'https://esi.evetech.net/latest/alliances/{}/?datasource=tranquility'.format(group_id)) as resp: data = await resp.text() data = json.loads(data) try: