From cdbfe669c8df6b777e38cff15c71549d3d34c175 Mon Sep 17 00:00:00 2001 From: Ondrej Samohel Date: Thu, 17 Jun 2021 13:47:23 +0200 Subject: [PATCH] raise exceptions when ue not found --- openpype/hosts/unreal/hooks/pre_workfile_preparation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/unreal/hooks/pre_workfile_preparation.py b/openpype/hosts/unreal/hooks/pre_workfile_preparation.py index 7c4b6c3088..c292730fb1 100644 --- a/openpype/hosts/unreal/hooks/pre_workfile_preparation.py +++ b/openpype/hosts/unreal/hooks/pre_workfile_preparation.py @@ -4,7 +4,8 @@ import os from openpype.lib import ( PreLaunchHook, - ApplicationLaunchFailed + ApplicationLaunchFailed, + ApplicationNotFound ) from openpype.hosts.unreal.api import lib as unreal_lib @@ -62,6 +63,8 @@ class UnrealPrelaunchHook(PreLaunchHook): f"{self.signature} detected UE4 versions: " f"[ {detected_str} ]" )) + if not detected: + raise ApplicationNotFound("No Unreal Engines are found.") engine_version = ".".join(engine_version.split(".")[:2]) if engine_version not in detected.keys():