raise error notification if step can't be started

This commit is contained in:
avollkopf 2024-01-12 18:37:05 +01:00
parent b642bab351
commit 60afd70dfe
2 changed files with 3 additions and 2 deletions

View file

@ -1,3 +1,3 @@
__version__ = "4.3.2.a2" __version__ = "4.3.2.a3"
__codename__ = "Winter Storm" __codename__ = "Winter Storm"

View file

@ -9,7 +9,7 @@ from os import listdir
import os import os
from os.path import isfile, join from os.path import isfile, join
import shortuuid import shortuuid
from cbpi.api.dataclasses import NotificationAction, Props, Step from cbpi.api.dataclasses import NotificationAction, NotificationType, Props, Step
from tabulate import tabulate from tabulate import tabulate
from ..api.step import StepMove, StepResult, StepState from ..api.step import StepMove, StepResult, StepState
@ -299,6 +299,7 @@ class StepController:
await step.instance.start() await step.instance.start()
step.status = StepState.ACTIVE step.status = StepState.ACTIVE
except Exception as e: except Exception as e:
self.cbpi.notify("Error", "Can't start step. Please check step in Mash Profile", NotificationType.ERROR)
logging.error("Failed to start step %s" % step) logging.error("Failed to start step %s" % step)
async def save_basic(self, data): async def save_basic(self, data):