Skip to content

Commit

Permalink
enhance error if no token
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowbean committed Jul 18, 2023
1 parent e842bb7 commit c9c28ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions absbox/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ def runLibrary(self,_id,**p):
pricingAssump = p.get("pricing",None)
dealAssump = p.get("assump",None)
runReq = self.build_req(_id, dealAssump, pricingAssump) # {"production":p.get("production",True)}
if not hasattr(self,"token"):
console.print(f"❌[bold red] No token found , please call loginLibrary() to login")
return
result = self._send_req(runReq, deal_library_url, headers={"Authorization":f"Bearer {self.token}"})
def lookupReader(x):
match x:
Expand Down

0 comments on commit c9c28ea

Please sign in to comment.