Skip to content

Commit

Permalink
wip (sso): fix message display logic
Browse files Browse the repository at this point in the history
  • Loading branch information
vaimdev committed Nov 6, 2024
1 parent 412e944 commit 9283e8a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions graphistry/pygraphistry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2476,7 +2476,7 @@ def sso_repeat_get_token(repeat: int = 20, wait: int = 5):
return

@staticmethod
def sso_wait_for_token_html_display(repeat: int = 20, wait: int = 5, fail_silently: bool = True):
def sso_wait_for_token_html_display(repeat: int = 20, wait: int = 5, fail_silently: bool = False):
"""Get the JWT token for SSO login and display corresponding message in HTML
Get the JWT token for SSO login and display corresponding message in HTML
"""
Expand All @@ -2486,7 +2486,12 @@ def sso_wait_for_token_html_display(repeat: int = 20, wait: int = 5, fail_silent
if not PyGraphistry.sso_repeat_get_token(repeat, wait):
msg_html = f'{msg_html}<br /><strong>Failed to get token after {repeat*wait} seconds .... </strong>'
if not fail_silently:
raise Exception(f"Failed to get token after {repeat*wait} seconds ....")
raise Exception(f"Failed to get token after {repeat*wait} seconds. Please re-run the process")
else:
msg_html = f'{msg_html}<br /><strong>Got token</strong>'
display(HTML(msg_html))
return

msg_html = f'{msg_html}<br /><strong>Got token</strong>'
display(HTML(msg_html))
else:
Expand Down

0 comments on commit 9283e8a

Please sign in to comment.