aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/iotests.py
diff options
context:
space:
mode:
authorNir Soffer <nirsof@gmail.com>2020-08-29 02:21:52 +0300
committerMax Reitz <mreitz@redhat.com>2020-09-15 11:05:12 +0200
commit7cc002a06cde0e4df6cb4d546e4b21bb6433fcc3 (patch)
tree06637c5d13f07474bd6ac87dc8eaf5fb9deaf393 /tests/qemu-iotests/iotests.py
parent3192fad7f789404dce6041d01400db3c16a0b5d1 (diff)
qemu-iotests: Simplify FilePath __init__
Use list comprehension instead of append loop. Signed-off-by: Nir Soffer <nsoffer@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200828232152.205833-6-nsoffer@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/iotests.py')
-rw-r--r--tests/qemu-iotests/iotests.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 1799338f8b..91e4a57126 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -470,9 +470,8 @@ class FilePath:
"""
def __init__(self, *names, base_dir=test_dir):
- self.paths = []
- for name in names:
- self.paths.append(os.path.join(base_dir, file_pattern(name)))
+ self.paths = [os.path.join(base_dir, file_pattern(name))
+ for name in names]
def __enter__(self):
if len(self.paths) == 1: