summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/py/tests/fs_helper.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/py/tests/fs_helper.py b/test/py/tests/fs_helper.py
index ee779474ce6..e3824b2c1fd 100644
--- a/test/py/tests/fs_helper.py
+++ b/test/py/tests/fs_helper.py
@@ -87,7 +87,7 @@ class FsHelper:
"""Remove created image"""
if self.tmpdir:
self.tmpdir.cleanup()
- if self._do_cleanup:
+ if self._do_cleanup and self.fs_img:
os.remove(self.fs_img)
def __enter__(self):