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
D-GENIES
Commits
9d65e708
Commit
9d65e708
authored
Nov 08, 2017
by
Floreal Cabanettes
Browse files
Replace spaces and special chars in job names, Fixes
#70
parent
7dc45cd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
srv/main.py
View file @
9d65e708
...
...
@@ -4,6 +4,7 @@ import os
import
time
import
datetime
import
shutil
import
re
from
flask
import
Flask
,
render_template
,
request
,
url_for
,
jsonify
,
session
from
flask_mail
import
Mail
from
lib.paf
import
Paf
...
...
@@ -94,6 +95,7 @@ def launch_analysis():
# Form pass
if
form_pass
:
# Get final job id:
id_job
=
re
.
sub
(
'[^A-Za-z0-9_\-]+'
,
''
,
id_job
.
replace
(
" "
,
"_"
))
id_job_orig
=
id_job
while
os
.
path
.
exists
(
os
.
path
.
join
(
app_data
,
id_job
)):
id_job
=
id_job_orig
+
"_2"
...
...
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