From 6ef566cbc9899698bb215632e792e127cd049a7c Mon Sep 17 00:00:00 2001 From: chStaiger Date: Wed, 26 Jun 2024 05:50:51 +0200 Subject: [PATCH] Stop login when home does not exist --- ibridgesgui/login.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ibridgesgui/login.py b/ibridgesgui/login.py index 7df107a2..5fee9831 100644 --- a/ibridgesgui/login.py +++ b/ibridgesgui/login.py @@ -86,7 +86,6 @@ def login_function(self): ) session.write_pam_password() set_last_ienv_path(env_file.name) - self.close() except LoginError: self.error_label.setText("irods_environment.json not setup correctly.") self.logger.error("irods_environment.json not setup correctly.") @@ -102,3 +101,10 @@ def login_function(self): log_path = Path("~/.ibridges") self.logger.exception("Failed to login: %s", repr(err)) self.error_label.setText(f"Login failed, consult the log file(s) in {log_path}") + + #check irods_home + if not IrodsPath(session).collection_exists(): + self.error_label.setText(f'"irods_home": "{session.home}" does not exist.") + self.logger.error("irods_home does not exist.") + else: + self.close()