Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Maintenance - Mise à jour mensuelle Lundi 6 Février entre 7h00 et 9h00
Open sidebar
genotoul-bioinfo
D-GENIES
Commits
a88ebe18
Commit
a88ebe18
authored
Apr 10, 2018
by
Floreal Cabanettes
Browse files
Fix mail message on errors
parent
dd238c06
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dgenies/lib/job_manager.py
View file @
a88ebe18
...
...
@@ -529,8 +529,25 @@ class JobManager:
allowed
=
Functions
.
allowed_file
(
filename
,
formats
)
if
not
allowed
:
status
=
"fail"
error
=
"<p>File <b>%s</b> downloaded from <b>%s</b> is not a Fasta file!</p>"
\
"<p>If this is unattended, please contact the support.</p>"
%
(
filename
,
url
)
format_txt
=
""
if
len
(
formats
)
==
1
:
if
formats
[
0
]
==
"fasta"
:
format_txt
=
"a Fasta file"
elif
formats
[
0
]
==
"idx"
:
format_txt
=
"an index file"
elif
formats
[
0
]
==
"map"
:
format_txt
=
"an alignment file"
elif
formats
[
0
]
==
"backup"
:
format_txt
=
"a backup file"
else
:
format_txt
=
"a valid file"
else
:
if
"fasta"
in
formats
and
"idx"
in
formats
:
format_txt
=
"a Fasta file or an index file"
else
:
format_txt
=
"a valid file"
error
=
"<p>File <b>%s</b> downloaded from <b>%s</b> is not %s!</p>"
\
"<p>If this is unattended, please contact the support.</p>"
%
(
filename
,
url
,
format_txt
)
if
MODE
==
"webserver"
:
with
Job
.
connect
():
job
=
Job
.
get
(
Job
.
id_job
==
self
.
id_job
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment