From 50b8eec3ffce179f193a72f836fd099d9a1d6523 Mon Sep 17 00:00:00 2001 From: Andrew Rowley Date: Thu, 20 Jun 2024 11:22:58 +0100 Subject: [PATCH] Allow spalloc with other credentials --- spinnman/spalloc/spalloc_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spinnman/spalloc/spalloc_client.py b/spinnman/spalloc/spalloc_client.py index c19bf3e51..451bfffa8 100644 --- a/spinnman/spalloc/spalloc_client.py +++ b/spinnman/spalloc/spalloc_client.py @@ -120,9 +120,9 @@ def __init__( if username is None and password is None: service_url, username, password = parse_service_url(service_url) if username is None: - username = os.environ["SPALLOC_USER"] + username = os.getenv("SPALLOC_USER", None) if password is None: - password = os.environ["SPALLOC_PASSWORD"] + password = os.getenv("SPALLOC_PASSWORD", None) self.__session: Optional[Session] = Session( service_url, username, password, bearer_token)