Commit ef500704 authored by Daalen, Tim van's avatar Daalen, Tim van
Browse files

manual merge fix

parents 5d736a80 375a2580
......@@ -221,7 +221,7 @@ class elabUpload(QWidget, Ui_tabELNData):
self.elnUploadButton.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
except Exception as e:
logging.info("ElabUpload UploadData: "+repr(error))
logging.info("ElabUpload UploadData: "+repr(e))
self.errorLabel.setText(repr(e))
self.elnUploadButton.setEnabled(True)
self.elnUploadButton.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
......@@ -265,7 +265,7 @@ class Worker(QObject):
self.progress.emit(3)
self.finished.emit()
except Exception as e:
logging.info("ElabUpload data upload and annotation worker: "+repr(error))
logging.info("ElabUpload data upload and annotation worker: "+repr(e))
print(repr(e))
self.annotateElab()
......
......@@ -284,9 +284,15 @@ class irodsBrowser(QWidget, Ui_tabBrowser):
self.__clearErrorLabel()
self.__clearViewTabs()
<<<<<<< HEAD
self.metadataTable.setRowCount(0);
self.aclTable.setRowCount(0);
self.resourceTable.setRowCount(0);
=======
self.widget.metadataTable.setRowCount(0)
self.widget.aclTable.setRowCount(0)
self.widget.resourceTable.setRowCount(0)
>>>>>>> master
col = index.column()
row = index.row()
......@@ -413,8 +419,13 @@ class irodsBrowser(QWidget, Ui_tabBrowser):
self.errorLabel.setText(
"IRODS NETWORK ERROR: No Connection, please check network")
except Exception as error:
<<<<<<< HEAD
print("ERROR upload :", fileSelect[0], "failed; \n\t", repr(error))
self.errorLabel.setText(repr(error))
=======
print("ERROR download :", parent+'/'+objName, "failed; \n\t", repr(error))
self.widget.errorLabel.setText(repr(error))
>>>>>>> master
#@QtCore.pyqtSlot(QtCore.QModelIndex)
......
......@@ -142,10 +142,15 @@ class irodsDataCompression(QWidget, Ui_tabDataCompression):
def dataCreateExtractFinished(self, success, message, operation):
self.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
self.enableButtons(True)
stdout, stderr = message
if success and operation == "create":
idx, source = self.collectionTreeModel.get_checked()
<<<<<<< HEAD
stdout, stderr = message
self.createStatusLabel.setText("STATUS: Created " + str(stdout))
=======
self.widget.createStatusLabel.setText("STATUS: Created " + str(stdout))
>>>>>>> master
parentIdx = self.collectionTreeModel.getParentIdx(idx)
self.collectionTreeModel.refreshSubTree(parentIdx)
elif not success and operation == "create":
......
......@@ -4,7 +4,11 @@ from PyQt5.uic import loadUi
import os
from utils.utils import getDownloadDir
<<<<<<< HEAD
from gui.ui_files.searchDialog import Ui_searchDialog
=======
import logging
>>>>>>> master
class irodsSearch(QDialog, Ui_searchDialog):
def __init__(self, ic, collTable):
......
......@@ -43,10 +43,17 @@ class irodsTicketLogin(QWidget, Ui_tabTicketAccess):
def irodsSession(self):
<<<<<<< HEAD
self.infoLabel.clear()
host = self.serverEdit.text()
path = self.pathEdit.text()
token = self.ticketEdit.text()
=======
self.widget.infoLabel.clear()
host = self.widget.serverEdit.text().strip()
path = self.widget.pathEdit.text().strip()
token = self.widget.ticketEdit.text().strip()
>>>>>>> master
try:
self.ic = irodsConnectorAnonymous(host, token, path)
......
......@@ -47,7 +47,7 @@ def getConfig(path):
def connectIRODS(config):
#icommands present and irods_environment file present and user wants to use standard envFile
standardEnv = os.path.expanduser('~' +os.sep+'.irods/irods_environment.json')
standardEnv = os.path.expanduser('~' +os.sep+'.irods'+os.sep+'irods_environment.json')
if os.path.exists(standardEnv) and \
(config['iRODS']['irodsenv'] == '' or config['iRODS']['irodsenv'] == standardEnv):
try:
......@@ -68,7 +68,7 @@ def connectIRODS(config):
print(BLUE+"INFO: Data up and download by python API."+DEFAULT)
else:
raise FileNotFoundError('Environment file not found: '+ envFile)
raise FileNotFoundError('Environment file not found e.g. '+ standardEnv)
return ic
......
from irods.session import iRODSSession
from irods.access import iRODSAccess
from irods.ticket import Ticket
from irods.exception import CATALOG_ALREADY_HAS_ITEM_BY_THAT_NAME, CAT_NO_ACCESS_PERMISSION
from irods.exception import CAT_SUCCESS_BUT_WITH_NO_INFO, CAT_INVALID_ARGUMENT, CAT_INVALID_USER, CAT_INVALID_AUTHENTICATION
from irods.exception import CATALOG_ALREADY_HAS_ITEM_BY_THAT_NAME, \
CAT_NO_ACCESS_PERMISSION, CAT_SUCCESS_BUT_WITH_NO_INFO, \
CAT_INVALID_ARGUMENT, CAT_INVALID_USER, CAT_INVALID_AUTHENTICATION,\
NO_RULE_OR_MSI_FUNCTION_FOUND_ERR
from irods.exception import CollectionDoesNotExist
from irods.connection import PlainTextPAMPasswordError
from irods.models import Collection, DataObject, Resource, ResourceMeta, CollectionMeta, DataObjectMeta
......@@ -719,8 +722,13 @@ class irodsConnector():
'*value': '"attr_value"'
}
"""
rule = Rule(self.session, ruleFile, params=params, output=output)
out = rule.execute()
try:
rule = Rule(self.session, ruleFile, params=params, output=output)
out = rule.execute()
except Exception as e:
logging.info('RULE EXECUTION ERROR', exc_info=True)
return [], [repr(e)]
stdout = []
stderr = []
if len(out.MsParam_PI) > 0:
......@@ -730,7 +738,7 @@ class irodsConnector():
stderr = [o.decode()
for o in (out.MsParam_PI[0].inOutStruct.stderrBuf.buf.strip(b'\x00')).split(b'\n')]
except AttributeError:
#logging.info('RULE EXECUTION ERROR: '+str(stdout+stderr), exc_info=True)
logging.info('RULE EXECUTION ERROR: '+str(stdout+stderr), exc_info=True)
return stdout, stderr
return stdout, stderr
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment