Fix some old references to 'session' instead of 'self'.

This commit is contained in:
Anna Rose 2016-01-21 11:29:22 -05:00
parent 5bb81317a8
commit 95869d1daa

View File

@ -56,7 +56,7 @@ class InaraSession(CachedSession):
return logout_link is not None return logout_link is not None
def update_credits(self, credits): def update_credits(self, credits):
soup = session.get_soup(CMDR_URL) soup = self.get_soup(CMDR_URL)
if not self._inara_is_logged_in(soup): if not self._inara_is_logged_in(soup):
return False return False
@ -84,14 +84,14 @@ class InaraSession(CachedSession):
result = {} result = {}
if wing_id is not None and cmdr_id is not None: if wing_id is not None and cmdr_id is not None:
wing_soup = session.get_soup("%s/wing/%s" % (BASE_URL, wing_id)) wing_soup = self.get_soup("%s/wing/%s" % (BASE_URL, wing_id))
result['rank'] = _get_rank(wing_soup, cmdr_id) result['rank'] = _get_rank(wing_soup, cmdr_id)
result['location'] = _get_location(wing_soup, cmdr_id) result['location'] = _get_location(wing_soup, cmdr_id)
if cmdr_id is not None: if cmdr_id is not None:
cmdr_soup = session.get_soup("%s/cmdr/%s" % (BASE_URL, cmdr_id)) cmdr_soup = self.get_soup("%s/cmdr/%s" % (BASE_URL, cmdr_id))
else: else:
cmdr_soup = session.get_soup(CMDR_URL) cmdr_soup = self.get_soup(CMDR_URL)
result['balance'] = _get_cmdr_balance(cmdr_soup) result['balance'] = _get_cmdr_balance(cmdr_soup)
result['assets'] = _get_cmdr_assets(cmdr_soup) result['assets'] = _get_cmdr_assets(cmdr_soup)