ensure v2 scheduler before test scheduler enabled

This commit is contained in:
Damien Elmes 2021-05-10 14:57:30 +10:00
parent aeba725d3e
commit ea319b3dfc

View File

@ -169,6 +169,8 @@ class Collection:
def set_2021_test_scheduler_enabled(self, enabled: bool) -> None: def set_2021_test_scheduler_enabled(self, enabled: bool) -> None:
if self.is_2021_test_scheduler_enabled() != enabled: if self.is_2021_test_scheduler_enabled() != enabled:
if enabled and self.schedVer() != 2:
raise Exception("must upgrade to v2 scheduler first")
self.set_config_bool(Config.Bool.SCHED_2021, enabled) self.set_config_bool(Config.Bool.SCHED_2021, enabled)
self._loadScheduler() self._loadScheduler()