mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
3192fad7f7
commit
7cc002a06c
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue