[utils] Deprecate make_dir in favor of make_parent_dirs (#16931)

Authored by: doe1080
This commit is contained in:
doe1080
2026-06-12 22:53:58 +00:00
committed by GitHub
parent a2483524fb
commit b05b408d10
5 changed files with 28 additions and 14 deletions
+3 -10
View File
@@ -4713,16 +4713,9 @@ def random_uuidv4():
return re.sub(r'[xy]', lambda x: _HEX_TABLE[random.randint(0, 15)], 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx')
def make_dir(path, to_screen=None):
try:
dn = os.path.dirname(path)
if dn:
os.makedirs(dn, exist_ok=True)
return True
except OSError as err:
if callable(to_screen) is not None:
to_screen(f'unable to create directory {err}')
return False
def make_parent_dirs(path):
if dir_name := os.path.dirname(path):
os.makedirs(dir_name, exist_ok=True)
def get_executable_path():