Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #167 from shibdib/dev
Browse files Browse the repository at this point in the history
Fix a few old esi links and switch db logging level
  • Loading branch information
shibdib authored Jan 18, 2019
2 parents f9a3fdb + 1e64dea commit 76b8ceb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions firetail/extensions/char_lookup/char_lookup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions firetail/extensions/location_scout/location_scout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions firetail/extensions/sov_tracker/sov_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions firetail/lib/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down

0 comments on commit 76b8ceb

Please sign in to comment.