Skip to content

Commit

Permalink
Stop login when home does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
chStaiger authored Jun 26, 2024
1 parent 8aedbc5 commit 6ef566c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ibridgesgui/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -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()

0 comments on commit 6ef566c

Please sign in to comment.