Skip to content

Commit

Permalink
pop 'AYON_API_KEY' before login
Browse files Browse the repository at this point in the history
  • Loading branch information
iLLiCiTiT committed Aug 14, 2024
1 parent e62c3e8 commit faba6ad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,19 +872,22 @@ def process_uri():
username = data.get("userName")

os.environ[SERVER_URL_ENV_KEY] = server_url
_connect_to_ayon_server(username=username)
variant = data["variant"]

# Cleanup environemnt variables
env = os.environ.copy()
# Remove all possible clash env keys
# - removing 'AYON_API_KEY' removes option to have set
# the env variable globaly on machine
for key in {
"AYON_API_KEY",
"AYON_USE_STAGING",
"AYON_USE_DEV",
}:
env.pop(key, None)

_connect_to_ayon_server(username=username)
variant = data["variant"]

# Set new environment variables based on information from server
if variant == "staging":
env["AYON_USE_STAGING"] = "1"
Expand Down

0 comments on commit faba6ad

Please sign in to comment.