Fix some old references to 'session' instead of 'self'.
This commit is contained in:
parent
5bb81317a8
commit
95869d1daa
8
inara.py
8
inara.py
|
@ -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)
|
||||||
|
|
Reference in New Issue
Block a user