Skip to content

Commit 4e04dd5

Browse files
committed
fix: initialise mismatch_action before try block to fix false-positive unused variable warning
1 parent e0f2abc commit 4e04dd5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/orb/infrastructure/template/configuration_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,14 +586,14 @@ def _validate_basic_template_structure(
586586
template.metadata.get("scheduler_type") if isinstance(template.metadata, dict) else None
587587
)
588588
if template_scheduler_type is not None:
589+
active_scheduler_type = None
590+
mismatch_action = "warn"
589591
try:
590592
active_scheduler_type = self.config_manager.app_config.scheduler.type
591593
mismatch_action = getattr(
592594
self.config_manager.app_config.scheduler, "on_scheduler_mismatch", "warn"
593595
)
594596
except Exception as e:
595-
active_scheduler_type = None
596-
mismatch_action = "warn"
597597
self.logger.debug("Could not read scheduler config for mismatch check: %s", e)
598598

599599
if active_scheduler_type and template_scheduler_type != active_scheduler_type:

0 commit comments

Comments
 (0)