Browser Steps - When cleaning up old screenshots, check the file exists

pull/1689/head
dgtlmoon 2023-07-11 10:44:54 +02:00
rodzic aaceb4ebad
commit 7cb7eebbc5
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -201,7 +201,8 @@ class Fetcher():
dest = os.path.join(self.browser_steps_screenshot_path, 'step_*.jpeg')
files = glob.glob(dest)
for f in files:
os.unlink(f)
if os.path.isfile(f):
os.unlink(f)
# Maybe for the future, each fetcher provides its own diff output, could be used for text, image