From d284014cd86484ac9fa9142af824061b3ee5fc5a Mon Sep 17 00:00:00 2001 From: Ben Rutter Date: Mon, 27 May 2024 14:05:54 +0100 Subject: [PATCH] environ.get over getenv --- dask_databricks/databrickscluster.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dask_databricks/databrickscluster.py b/dask_databricks/databrickscluster.py index 8a9d5a7..3be2904 100644 --- a/dask_databricks/databrickscluster.py +++ b/dask_databricks/databrickscluster.py @@ -23,13 +23,13 @@ def __init__( loop: Optional[IOLoop] = None, asynchronous: bool = False, ): - self.spark_local_ip = os.getenv("SPARK_LOCAL_IP") + self.spark_local_ip = os.environ.get("SPARK_LOCAL_IP") if self.spark_local_ip is None: raise KeyError( "Unable to find expected environment variable SPARK_LOCAL_IP. " "Are you running this on a Databricks driver node?" ) - if os.getenv("MASTER") and "local[" in os.getenv("MASTER"): + if os.environ.get("MASTER") and "local[" in os.environ.get("MASTER"): raise EnvironmentError( "You appear to be running dask-databricks on a " "single-node cluster. Dask requires at least one worker node "