From 2fe1d74f430333aabd5031d68e33cfbb2b254618 Mon Sep 17 00:00:00 2001 From: Jonathan Karlsen Date: Wed, 18 Dec 2024 15:24:25 +0100 Subject: [PATCH] fix issue where i try printing non-existent property on none in ensembleselector This raised an AttributeError which Qt swallowed --- src/ert/gui/ertwidgets/ensembleselector.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/ert/gui/ertwidgets/ensembleselector.py b/src/ert/gui/ertwidgets/ensembleselector.py index 38fb9e83241..51589073cd6 100644 --- a/src/ert/gui/ertwidgets/ensembleselector.py +++ b/src/ert/gui/ertwidgets/ensembleselector.py @@ -61,15 +61,7 @@ def __init__( @property def selected_ensemble(self) -> Ensemble: - print("GETTING SELECTED_ENSEMBLE") - print(f"{self.count()=}") - try: - itemData: LocalEnsemble = self.itemData(self.currentIndex()) - except Exception as e: - print(f"{e=}") - raise e - - print(f"{itemData.experiment.is_valid()=}") + itemData: LocalEnsemble | None = self.itemData(self.currentIndex()) return itemData def populate(self) -> None: