Skip to content

Commit

Permalink
Merge pull request #1282 from MetPX/issue1266
Browse files Browse the repository at this point in the history
Fix #1266 - Add a check for any disabled configs when using sr3 start
  • Loading branch information
petersilva authored Oct 29, 2024
2 parents 5962139 + af41050 commit 2f35022
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions sarracenia/sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2233,6 +2233,20 @@ def start(self):
if len(self.leftovers) > 0 and not self._action_all_configs:
logging.error( f"{self.leftovers} configuration not found" )
return

has_disabled_config = False

# if any configs are disabled, don't start any
for f in self.filtered_configurations:
(c, cfg) = f.split(os.sep)

if self.configs[c][cfg]['status'] == 'disabled':
has_disabled_config = True
logger.error(f"Config {c}/{cfg} is disabled. It must be enabled before starting.")

if has_disabled_config:
logger.error("No configs have been started due to disabled configurations.")
return

pcount = 0
for f in self.filtered_configurations:
Expand Down

0 comments on commit 2f35022

Please sign in to comment.