This commit is contained in:
Maxim Devaev 2022-01-06 05:04:29 +03:00
parent 04f9bbe568
commit a67c20be29

View File

@ -71,13 +71,12 @@ def _rmdir(path: str) -> None:
def _unlink(path: str, optional: bool=False) -> None: def _unlink(path: str, optional: bool=False) -> None:
logger = get_logger() logger = get_logger()
if optional and not os.access(path, os.F_OK): if optional and not os.access(path, os.F_OK):
logger.info("SKIP ---- %s", path) logger.info("SKIP-RM - %s", path)
return return
logger.info("RM ------ %s", path) logger.info("RM ------ %s", path)
os.unlink(path) os.unlink(path)
def _write(path: str, text: str, optional: bool=False) -> None: def _write(path: str, text: str, optional: bool=False) -> None:
logger = get_logger() logger = get_logger()
if optional and not os.access(path, os.F_OK): if optional and not os.access(path, os.F_OK):