refactoring

This commit is contained in:
Maxim Devaev
2024-09-18 04:37:43 +03:00
parent 45270a09d7
commit 7a53f14456
83 changed files with 517 additions and 516 deletions

View File

@@ -55,8 +55,8 @@ def valid_abs_path(arg: Any, type: str="", name: str="") -> str: # pylint: disa
if type:
try:
st = os.stat(arg)
except Exception as err:
raise_error(arg, f"{name}: {err}")
except Exception as ex:
raise_error(arg, f"{name}: {ex}")
else:
if not getattr(stat, f"S_IS{type.upper()}")(st.st_mode):
raise_error(arg, name)