Skip to content

Commit

Permalink
environ.get over getenv
Browse files Browse the repository at this point in the history
  • Loading branch information
benrutter committed May 27, 2024
1 parent e90ceee commit d284014
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dask_databricks/databrickscluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down

0 comments on commit d284014

Please sign in to comment.