Return calculated assets from update_credits.
This commit is contained in:
parent
54641033aa
commit
f244526458
4
inara.py
4
inara.py
|
@ -58,7 +58,7 @@ class InaraSession(CachedSession):
|
||||||
def update_credits(self, credits):
|
def update_credits(self, credits):
|
||||||
soup = self.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 None
|
||||||
|
|
||||||
oass = int(soup.find(id='oassinput')['value'])
|
oass = int(soup.find(id='oassinput')['value'])
|
||||||
data = {
|
data = {
|
||||||
|
@ -70,7 +70,7 @@ class InaraSession(CachedSession):
|
||||||
}
|
}
|
||||||
r = self.post(CMDR_URL, data=data)
|
r = self.post(CMDR_URL, data=data)
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
return True
|
return credits + oass
|
||||||
|
|
||||||
def update_location(self, location):
|
def update_location(self, location):
|
||||||
data = {
|
data = {
|
||||||
|
|
Reference in New Issue
Block a user