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)