Skip to content

Commit eda9331

Browse files
committed
Avoid PROJECT_ID=None in testing if env not set
1 parent 2576f30 commit eda9331

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/ci/run_targeting_aura_sessions.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ def handle_signal(sig: int, frame: Optional[FrameType]) -> None:
4343
username = create_result["username"]
4444
password = create_result["password"]
4545

46-
cmd = f"CLIENT_ID={client_id} CLIENT_SECRET={client_secret} PROJECT_ID={project_id} NEO4J_URI={uri} NEO4J_USERNAME={username} NEO4J_PASSWORD={password} tox -e jupyter-notebook-session-ci"
46+
if project_id:
47+
# Avoid the `None` literal as the value for the variable
48+
project_id_part = f"PROJECT_ID={project_id}"
49+
else:
50+
project_id_part = ""
51+
52+
cmd = f"CLIENT_ID={client_id} CLIENT_SECRET={client_secret} {project_id_part} NEO4J_URI={uri} NEO4J_USERNAME={username} NEO4J_PASSWORD={password} tox -e jupyter-notebook-session-ci"
4753

4854
if os.system(cmd) != 0:
4955
raise Exception("Failed to run notebooks")

0 commit comments

Comments
 (0)