This commit is contained in:
Tzu-ping Chung
2018-11-06 16:13:39 +09:00
parent 41023c33ae
commit b7564057f7
+2 -4
View File
@@ -8,7 +8,6 @@ import os
import posixpath
import shutil
import stat
import sys
import warnings
import six
@@ -206,9 +205,8 @@ def mkdir_p(newdir, mode=0o777):
target = os.path.join(head, tail)
if os.path.exists(target) and os.path.isfile(target):
raise OSError(
"A file with the same name as the desired dir, '{0}', already exists.".format(
to_text(newdir, encoding="utf-8")
)
"A file with the same name as the desired dir, '{0}', "
"already exists.".format(to_text(newdir, encoding="utf-8"))
)
os.makedirs(os.path.join(head, tail), mode)