Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
irods-clients
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RDM Infrastructure
irods-clients
Commits
b2c87a81
Commit
b2c87a81
authored
3 years ago
by
Staiger, Christine
Browse files
Options
Downloads
Patches
Plain Diff
Adding error message if rule execution fails on iRODS level.
parent
b599a584
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
utils/irodsConnector.py
+13
-5
13 additions, 5 deletions
utils/irodsConnector.py
with
13 additions
and
5 deletions
utils/irodsConnector.py
+
13
−
5
View file @
b2c87a81
from
irods.session
import
iRODSSession
from
irods.session
import
iRODSSession
from
irods.access
import
iRODSAccess
from
irods.access
import
iRODSAccess
from
irods.ticket
import
Ticket
from
irods.ticket
import
Ticket
from
irods.exception
import
CATALOG_ALREADY_HAS_ITEM_BY_THAT_NAME
,
CAT_NO_ACCESS_PERMISSION
from
irods.exception
import
CATALOG_ALREADY_HAS_ITEM_BY_THAT_NAME
,
\
from
irods.exception
import
CAT_SUCCESS_BUT_WITH_NO_INFO
,
CAT_INVALID_ARGUMENT
,
CAT_INVALID_USER
,
CAT_INVALID_AUTHENTICATION
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.exception
import
CollectionDoesNotExist
from
irods.connection
import
PlainTextPAMPasswordError
from
irods.connection
import
PlainTextPAMPasswordError
from
irods.models
import
Collection
,
DataObject
,
Resource
,
ResourceMeta
,
CollectionMeta
,
DataObjectMeta
from
irods.models
import
Collection
,
DataObject
,
Resource
,
ResourceMeta
,
CollectionMeta
,
DataObjectMeta
...
@@ -719,8 +722,13 @@ class irodsConnector():
...
@@ -719,8 +722,13 @@ class irodsConnector():
'
*value
'
:
'"
attr_value
"'
'
*value
'
:
'"
attr_value
"'
}
}
"""
"""
rule
=
Rule
(
self
.
session
,
ruleFile
,
params
=
params
,
output
=
output
)
try
:
out
=
rule
.
execute
()
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
=
[]
stdout
=
[]
stderr
=
[]
stderr
=
[]
if
len
(
out
.
MsParam_PI
)
>
0
:
if
len
(
out
.
MsParam_PI
)
>
0
:
...
@@ -730,7 +738,7 @@ class irodsConnector():
...
@@ -730,7 +738,7 @@ class irodsConnector():
stderr
=
[
o
.
decode
()
stderr
=
[
o
.
decode
()
for
o
in
(
out
.
MsParam_PI
[
0
].
inOutStruct
.
stderrBuf
.
buf
.
strip
(
b
'
\x00
'
)).
split
(
b
'
\n
'
)]
for
o
in
(
out
.
MsParam_PI
[
0
].
inOutStruct
.
stderrBuf
.
buf
.
strip
(
b
'
\x00
'
)).
split
(
b
'
\n
'
)]
except
AttributeError
:
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
return
stdout
,
stderr
return
stdout
,
stderr
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment