From 798df756de4cf5bad7ddf511b098fd09a03655f6 Mon Sep 17 00:00:00 2001 From: Dmitry Rodionov Date: Tue, 19 Oct 2021 16:39:26 +0300 Subject: [PATCH] suppress FileNotFound exception instead of missing_ok=True because the latter is added in python 3.8 and we claim to support >3.6 --- test_runner/fixtures/zenith_fixtures.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test_runner/fixtures/zenith_fixtures.py b/test_runner/fixtures/zenith_fixtures.py index 7dbe61b04c..bd62ed4b15 100644 --- a/test_runner/fixtures/zenith_fixtures.py +++ b/test_runner/fixtures/zenith_fixtures.py @@ -14,7 +14,7 @@ import subprocess import time import filecmp -from contextlib import closing +from contextlib import closing, suppress from pathlib import Path from dataclasses import dataclass @@ -829,7 +829,8 @@ class WalAcceptor: def start(self) -> 'WalAcceptor': # create data directory if not exists self.data_dir.mkdir(parents=True, exist_ok=True) - self.pidfile.unlink(missing_ok=True) + with suppress(FileNotFoundError): + self.pidfile.unlink() cmd = [str(self.wa_bin_path)] cmd.extend(["-D", str(self.data_dir)])