Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
jflow
Commits
bc5edc7d
Commit
bc5edc7d
authored
Mar 12, 2013
by
Jerome Mariette
Browse files
handle errors when not adding a loaded component
parent
59a9f93b
Changes
1
Show whitespace changes
Inline
Side-by-side
src/jflow/workflow.py
View file @
bc5edc7d
...
...
@@ -111,6 +111,7 @@ class Workflow(threading.Thread):
def
add_component
(
self
,
component_name
,
args
=
[],
kwargs
=
{},
component_prefix
=
"default"
):
# first build and check if this component is OK
if
self
.
comp_pckg
.
has_key
(
component_name
):
my_pckge
=
__import__
(
self
.
comp_pckg
[
component_name
],
globals
(),
locals
(),
[
component_name
],
-
1
)
# build the object and define required field
cmpt_object
=
getattr
(
my_pckge
,
component_name
)()
...
...
@@ -134,6 +135,9 @@ class Workflow(threading.Thread):
return
cmpt_object
else
:
sys
.
exit
(
component_name
+
" component cannot be loaded, available components are: "
+
", "
.
join
(
self
.
comp_pckg
.
keys
()))
def
pre_process
(
self
):
pass
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment