diff options
author | Dylan Baker <baker.dylan.c@gmail.com> | 2015-01-17 21:54:52 -0800 |
---|---|---|
committer | Dylan Baker <baker.dylan.c@gmail.com> | 2015-03-09 10:23:38 -0700 |
commit | 9b6313269b953ab1fc7c82a8439243dba98e232d (patch) | |
tree | d2a360b4c9756b2c8cac8740fecf739a00dfe5f9 | |
parent | a32b93c629880e86c306f0645e80f917f299db28 (diff) |
igt.py: Change an empty string to a list
Currently there is a function that in some cases could return '', but
the output is assumed to be a list. This patch ensures that it always
returns a list.
v3: - further simplify the function by using two return statements
instead of a single return and assignment
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Thomas Wood <thomas.wood@intel.com>
-rw-r--r-- | tests/igt.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/igt.py b/tests/igt.py index d54bb65c5..aa9465b85 100644 --- a/tests/igt.py +++ b/tests/igt.py @@ -107,17 +107,15 @@ def listTests(listname): lines = (line.rstrip() for line in f.readlines()) found_header = False - progs = "" for line in lines: if found_header: - progs = line.split(" ") - break + return line.split(" ") if "TESTLIST" in line: found_header = True - return progs + return [] tests = listTests("single-tests") tests.extend(listTests("multi-tests")) |