Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Staiger, Christine committed Jun 26, 2024
1 parent 1edc57c commit ea7e24f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ibridgesgui/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def login_function(self):
session.home,
)
session.write_pam_password()
self.session_dict["session"] = session
set_last_ienv_path(env_file.name)
except LoginError:
self.error_label.setText("irods_environment.json not setup correctly.")
Expand All @@ -105,7 +106,7 @@ def login_function(self):

#check irods_home
fail_home = True
if not IrodsPath(session).collection_exists():
if not IrodsPath(self.session_dict["session"]).collection_exists():
self.error_label.setText(f'"irods_home": "{session.home}" does not exist.')
self.logger.error("irods_home does not exist.")
else:
Expand All @@ -114,7 +115,7 @@ def login_function(self):
#check existance of default resource
fail_resc = True
try:
resc = Resources(session).get_resource(session.default_resc)
resc = Resources(self.session_dict["session"]).get_resource(session.default_resc)
if resc.parent is None:
fail_resc = False
else:
Expand All @@ -126,6 +127,7 @@ def login_function(self):
except AttributeError:
self.error_label.setText(f'"default_resource": "{session.default_resc}" not valid.')

if not fail_resc and not fail_home:
self.session_dict["session"] = session
if fail_resc or fail_home:
del self.session_dict["session"]
else:
self.close()

0 comments on commit ea7e24f

Please sign in to comment.