diff --git a/src/antares_web_installer/gui/controller.py b/src/antares_web_installer/gui/controller.py index 41b36ee..00ba4ff 100644 --- a/src/antares_web_installer/gui/controller.py +++ b/src/antares_web_installer/gui/controller.py @@ -146,10 +146,8 @@ def install(self, callback: typing.Callable): def get_target_dir(self) -> Path: return self.model.target_dir - def set_target_dir(self, path: Path): - result = self.model.set_target_dir(path) - if not result: - raise ControllerError("Path '{}' is not a directory.".format(path)) + def set_target_dir(self, path: Path) -> None: + self.model.set_target_dir(path) def get_shortcut(self) -> bool: return self.model.shortcut diff --git a/src/antares_web_installer/gui/view.py b/src/antares_web_installer/gui/view.py index a8f7997..2dc140e 100644 --- a/src/antares_web_installer/gui/view.py +++ b/src/antares_web_installer/gui/view.py @@ -154,11 +154,7 @@ def get_target_dir(self) -> Path: return self.controller.get_target_dir() def set_target_dir(self, new_target_dir: str): - try: - self.controller.set_target_dir(Path(new_target_dir)) - except ControllerError as e: - logger.warning("Path is not valid: {}".format(e)) - self.raise_warning("Path selected is not valid") + self.controller.set_target_dir(Path(new_target_dir)) def get_launch(self) -> bool: return self.controller.get_launch()