diff --git a/Tools/HolocronToolset/src/toolset/gui/windows/indoor_builder.py b/Tools/HolocronToolset/src/toolset/gui/windows/indoor_builder.py index 7e6b0b7f2..6d8df3ccc 100644 --- a/Tools/HolocronToolset/src/toolset/gui/windows/indoor_builder.py +++ b/Tools/HolocronToolset/src/toolset/gui/windows/indoor_builder.py @@ -1133,7 +1133,7 @@ def _downloadKit(self, kitId: str) -> bool: return False finally: try: - if tempdir: + if tempdir and Path(tempdir).safe_isdir(): shutil.rmtree(tempdir) except Exception as exc: # noqa: BLE001 print(format_exception_with_variables(exc)) diff --git a/Tools/HolocronToolset/src/toolset/gui/windows/module_designer.py b/Tools/HolocronToolset/src/toolset/gui/windows/module_designer.py index 37c59d10e..2564568c9 100644 --- a/Tools/HolocronToolset/src/toolset/gui/windows/module_designer.py +++ b/Tools/HolocronToolset/src/toolset/gui/windows/module_designer.py @@ -262,7 +262,7 @@ def openModule(self): [ bwm.resource() # FIXME: resource() will sometimes return None for bwm in self._module.resources.values() - if bwm.restype() == ResourceType.WOK + if bwm.restype() == ResourceType.WOK and bwm.resource() is not None ], ) self.ui.flatRenderer.centerCamera()