Skip to content

Commit

Permalink
Fix download_schwab_token() to return after token write
Browse files Browse the repository at this point in the history
  • Loading branch information
punitarani committed Jul 28, 2024
1 parent b6bd95c commit e319933
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@

def download_schwab_token() -> None:
schwab_token = os.getenv("SCHWAB_TOKEN", None)
if schwab_token is None:
raise ValueError("SCHWAB_TOKEN environment variable not set")

if schwab_token is not None:
with open(SCHWAB_TOKEN_FP, "w") as f:
f.write(schwab_token)

raise ValueError("SCHWAB_TOKEN environment variable not set")
return


async def load_models():
Expand Down

0 comments on commit e319933

Please sign in to comment.