Skip to content

Commit 006e7b0

Browse files
committed
Load profile config by default
if nothing tries to set the config, profile_config wasn't loaded
1 parent 1e8d4f0 commit 006e7b0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ipyparallel/cluster/cluster.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,13 @@ def _merge_profile_config(self, proposal):
368368
config.merge(direct_config)
369369
return config
370370

371+
@default("config")
372+
def _default_config(self):
373+
if self.load_profile:
374+
return self.profile_config
375+
else:
376+
return Config()
377+
371378
def __init__(self, *, engines=None, controller=None, **kwargs):
372379
"""Construct a Cluster"""
373380
# handle more intuitive aliases, which match ipcluster cli args, etc.

0 commit comments

Comments
 (0)