aboutsummaryrefslogtreecommitdiff
path: root/src/suite
diff options
context:
space:
mode:
Diffstat (limited to 'src/suite')
-rw-r--r--src/suite/suite.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/suite/suite.py b/src/suite/suite.py
index c482c64..ee13268 100644
--- a/src/suite/suite.py
+++ b/src/suite/suite.py
@@ -6,7 +6,7 @@
# By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/07/15 18:24:29 by charles #+# #+# #
-# Updated: 2020/09/12 10:38:16 by charles ### ########.fr #
+# Updated: 2020/09/12 10:53:42 by charles ### ########.fr #
# #
# ############################################################################ #
@@ -32,12 +32,16 @@ class Suite:
if len(asked_names) == 0:
asked_names = [s.name for s in cls.available]
+ suite_names = [s.name for s in cls.available]
names = []
for i, name in enumerate(asked_names):
- matches = [s.name for s in cls.available
- if s.name.find("/") != -1
- and s.name[s.name.find("/") + 1:].startswith(name)
- or s.name.startswith(name)]
+ if name in suite_names:
+ names.append(name)
+ continue
+ matches = [n for n in suite_names
+ if n.find("/") != -1
+ and n[n.find("/") + 1:].startswith(name)
+ or n.startswith(name)]
if len(matches) == 1:
names.append(matches[0])
elif len(matches) != 0 and all([n.startswith(name) for n in matches]):