Skip to content

Commit

Permalink
fix pyright errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dianagudu committed Jul 21, 2023
1 parent 476e819 commit c99fa04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion flaat/caches.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def _fail(msg):
if isinstance(item, UserInfos):
if item.valid_for_secs is None:
_fail("Cache entry validity can not be determined")
if item.valid_for_secs <= 0: # pragma: no cover
elif item.valid_for_secs <= 0: # pragma: no cover
_fail("Cache entry has expired")
return item

Expand Down
6 changes: 3 additions & 3 deletions flaat/flaat_userinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ def main():
logger.error("No access token found")
sys.exit(1)
if args.trust_any:
at_info=get_access_token_info(access_token)
if hasattr(at_info, 'body'):
flaat.set_trusted_OP_list([at_info.body['iss']])
at_info = get_access_token_info(access_token)
if at_info and hasattr(at_info, "body"):
flaat.set_trusted_OP_list([at_info.body["iss"]])
user_infos = flaat.get_user_infos_from_access_token(
access_token, issuer_hint=args.issuer
)
Expand Down

0 comments on commit c99fa04

Please sign in to comment.