Skip to content

Commit

Permalink
Add check for any disabled configs when using sr3 start
Browse files Browse the repository at this point in the history
  • Loading branch information
mshak2 committed Oct 29, 2024
1 parent 95f77aa commit af41050
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 af41050

Please sign in to comment.