Skip to content

Commit 6380184

Browse files
committed
Add feedback when no %d specifiers found in RUNPATH
1 parent 365be9f commit 6380184

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/ert/_c_wrappers/enkf/res_config.py

+18
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,15 @@ def _alloc_from_content(self, user_config_file=None, config=None):
371371
f"`{config_content_dict[ConfigKeys.JOBNAME]}` instead"
372372
)
373373

374+
if (
375+
ConfigKeys.RUNPATH in config_content_dict
376+
and "%d" not in config_content_dict[ConfigKeys.RUNPATH]
377+
):
378+
logger.error(
379+
"RUNPATH keyword must contain one or two %d specifiers: "
380+
f"`{config_content_dict[ConfigKeys.RUNPATH]}`"
381+
)
382+
374383
self.model_config = ModelConfig.from_dict(
375384
self.ensemble_config.refcase, config_content_dict
376385
)
@@ -478,6 +487,15 @@ def _alloc_from_dict(self, config_dict):
478487
"ECLBASE ignored, using JOBNAME with value "
479488
f"`{config_dict[ConfigKeys.JOBNAME]}` instead"
480489
)
490+
491+
if ConfigKeys.RUNPATH in config_dict and "%d" not in config_dict.get(
492+
ConfigKeys.RUNPATH
493+
):
494+
logger.error(
495+
"RUNPATH keyword must contain one or two %d specifiers: "
496+
f"`{config_dict[ConfigKeys.RUNPATH]}`"
497+
)
498+
481499
self.model_config = ModelConfig.from_dict(
482500
self.ensemble_config.refcase, config_dict
483501
)

0 commit comments

Comments
 (0)