Skip to content

Commit

Permalink
login checks if home collection exists, remove from other classes (#211)
Browse files Browse the repository at this point in the history
Co-authored-by: Staiger, Christine <christine.staiger@wur.nl>
  • Loading branch information
chStaiger and Staiger, Christine authored Jun 26, 2024
1 parent 2f1b735 commit fe2d83e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions ibridgesgui/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,7 @@ def __init__(self, session, app_name):
self.session, f"/{self.session.zone}/home/{self.session.username}"
)

if root_path.collection_exists():
self.root_coll = IrodsPath(self.session, root_path).collection
elif IrodsPath(self.session, f"/{self.session.zone}/home").collection_exists():
self.root_coll = IrodsPath(self.session, f"/{self.session.zone}/home").collection
else:
self.root_coll = IrodsPath(self.session, f"/{self.session.zone}/home/{self.session.username}").collection
self.error_label.setText(
'Cannot set root collection. Set "irods_home" in your environment.json'
)
self.root_coll = IrodsPath(self.session, root_path).collection
self.reset_path()
self.browse()

Expand Down
2 changes: 1 addition & 1 deletion ibridgesgui/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
from pathlib import Path

from ibridges import Session, IrodsPath
from ibridges import IrodsPath, Session
from ibridges.session import LoginError, PasswordError
from PyQt6.QtWidgets import QDialog, QLineEdit
from PyQt6.uic import loadUi
Expand Down

0 comments on commit fe2d83e

Please sign in to comment.