From d412a58b8fc7478846ae4ed9d7a15257f0aacd79 Mon Sep 17 00:00:00 2001 From: Alban Gruin Date: Fri, 12 May 2017 11:07:17 +0200 Subject: Si la regex n'arrive pas à parser le groupe, alors la mention correspond au nom du groupe --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils.py') diff --git a/utils.py b/utils.py index 8e87c0f..fe6ec4c 100644 --- a/utils.py +++ b/utils.py @@ -63,7 +63,7 @@ def parse_group(name): group_regex = re.compile("^([\w ]+?)(\s*\-\s*(((CM)(\w))|((TD)(\w)(\d))|((TP)(\w)(\d)(\d))))?$") search = group_regex.search(name) if search is None: - return None, None, None, None + return name, None, None, None parts = search.groups(0) if parts[1] == 0: -- cgit v1.2.1