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
ng6
Commits
f144c949
Commit
f144c949
authored
Feb 18, 2014
by
Jerome Mariette
Browse files
No commit message
No commit message
parent
cee77d8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ng6/ng6workflow.py
View file @
f144c949
...
...
@@ -17,6 +17,7 @@
import
inspect
import
os
import
sys
import
pickle
import
datetime
...
...
@@ -63,7 +64,8 @@ class NG6Workflow (Workflow):
self
.
metadata
.
append
(
"project_id="
+
str
(
self
.
args
[
"project_id"
]))
# if user is not allowed to add data on project (is not admin)
if
self
.
project
is
not
None
and
not
self
.
project
.
is_admin
(
self
.
args
[
"admin_login"
]):
raise
ValueError
(
"The user login '"
+
self
.
args
[
"admin_login"
]
+
"' is not allowed to add data on project '"
+
self
.
project
.
name
+
"'."
)
sys
.
stderr
.
write
(
"The user login '"
+
self
.
args
[
"admin_login"
]
+
"' is not allowed to add data on project '"
+
self
.
project
.
name
+
"'.
\n
"
)
sys
.
exit
()
# if starting from a brand new project
elif
self
.
args
.
has_key
(
"project_name"
)
and
self
.
args
.
has_key
(
"project_description"
)
and
self
.
args
.
has_key
(
"admin_login"
):
self
.
project
=
Project
(
self
.
args
[
"project_name"
],
self
.
args
[
"project_description"
],
self
.
args
[
"admin_login"
])
...
...
@@ -75,7 +77,8 @@ class NG6Workflow (Workflow):
project
=
Project
.
get_from_run_id
(
self
.
args
[
"run_id"
])
# if user is not allowed to add data on project (is not admin)
if
not
project
.
is_admin
(
self
.
args
[
"admin_login"
]):
raise
ValueError
(
"The user login '"
+
self
.
args
[
"admin_login"
]
+
"' is not allowed to add data on project '"
+
project
.
name
+
"'."
)
sys
.
stderr
.
write
(
"The user login '"
+
self
.
args
[
"admin_login"
]
+
"' is not allowed to add data on project '"
+
project
.
name
+
"'."
)
sys
.
exit
()
self
.
runobj
=
Run
.
get_from_id
(
self
.
args
[
"run_id"
])
self
.
metadata
.
append
(
"run_id="
+
str
(
self
.
args
[
"run_id"
]))
# if starting from a brand new run
...
...
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