aboutsummaryrefslogtreecommitdiff
path: root/management/parsers/ups2018.py
diff options
context:
space:
mode:
authorAlban Gruin2018-09-19 21:02:00 +0200
committerAlban Gruin2018-09-19 21:02:00 +0200
commit3c8f53e8657ebc3bd2229ffe67f944d19d38d0b5 (patch)
tree5402b3b79bb379c56fcbaaca799aed6192e2899d /management/parsers/ups2018.py
parent676345434415d40363c80960484abf0295ca800a (diff)
parentfd516af7aedf938cc6fb65eca556e8341a0dfd92 (diff)
Merge branch 'stable/0.14.z' into prod/pa1ch/0.14.zv0.14.1-pa1ch
Signed-off-by: Alban Gruin <alban at pa1ch dot fr>
Diffstat (limited to 'management/parsers/ups2018.py')
-rw-r--r--management/parsers/ups2018.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/management/parsers/ups2018.py b/management/parsers/ups2018.py
index 8d97517..15c629a 100644
--- a/management/parsers/ups2018.py
+++ b/management/parsers/ups2018.py
@@ -94,7 +94,7 @@ class Parser(AbstractParser):
if data[0] == "Global Event":
return
- i = 1
+ i = 0
while i < len(data) and not data[i].startswith(
("L1 ", "L2 ", "L3 ", "L3P ", "M1 ", "M2 ", "DEUST ", "MAG1 ",
"1ERE ANNEE ", "2EME ANNEE ", "3EME ANNEE ",
@@ -103,11 +103,11 @@ class Parser(AbstractParser):
i += 1
groups = data[i]
- if i - 1 > 0:
+ if i - 1 >= 0:
course.name = ", ".join(set(data[i - 1].split(';')))
else:
course.name = "Sans nom"
- if i - 2 > 0:
+ if i - 2 >= 0:
course.type = data[i - 2]
if len(data) >= i + 2:
rooms = data[i + 1]