replace common.file_helpers.mkdirs_exists_ok with python os.makedirs funtion (#30618)

replace common.file_helpers.mkdirs_exists_ok with python os.makedirs function
old-commit-hash: db35dcd0b5353d9c009fcf5817e611125a6b0b8b
This commit is contained in:
Greg Hogan
2023-12-06 09:55:29 -08:00
committed by GitHub
parent a2df43c05e
commit e91032efb3
6 changed files with 6 additions and 20 deletions
-10
View File
@@ -4,16 +4,6 @@ import tempfile
from atomicwrites import AtomicWriter
def mkdirs_exists_ok(path):
if path.startswith(('http://', 'https://')):
raise ValueError('URL path')
try:
os.makedirs(path)
except OSError:
if not os.path.isdir(path):
raise
def rm_not_exists_ok(path):
try:
os.remove(path)