From 2bc214cd4a1afe9baa0abfa1c1da1a288bb79d23 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sun, 29 Oct 2017 04:19:45 -0500 Subject: [PATCH] Fix reusing ESI query builder. --- calefaction/eve/zkill.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/calefaction/eve/zkill.py b/calefaction/eve/zkill.py index c9db858..13ad447 100644 --- a/calefaction/eve/zkill.py +++ b/calefaction/eve/zkill.py @@ -27,32 +27,32 @@ class ZKillboard: Requires ESI API calls to fill in entity names. If we can't do them, we'll just set the names to be empty. """ - esi = g.eve.esi() + esi = g.eve.esi victim = kill["victim"] if "character_id" in victim: - char_info = esi.v4.characters(victim["character_id"]).get() + char_info = esi().v4.characters(victim["character_id"]).get() victim["character_name"] = char_info["name"] else: victim["character_id"] = 0 victim["character_name"] = "" if "corporation_id" in victim: - corp_info = esi.v3.corporations(victim["corporation_id"]).get() + corp_info = esi().v3.corporations(victim["corporation_id"]).get() victim["corporation_name"] = corp_info["corporation_name"] else: victim["corporation_id"] = 0 victim["corporation_name"] = "" if "alliance_id" in victim: - alliance_info = esi.v2.alliances(victim["alliance_id"]).get() + alliance_info = esi().v2.alliances(victim["alliance_id"]).get() victim["alliance_name"] = alliance_info["alliance_name"] else: victim["alliance_id"] = 0 victim["alliance_name"] = "" if "faction_id" in victim: - factions = esi.v1.universe.factions.get() + factions = esi().v1.universe.factions.get() matches = [fac["faction_name"] for fac in factions if fac["faction_id"] == victim["faction_id"]] victim["faction_name"] = matches[0] if matches else ""