File tree 1 file changed +7
-17
lines changed 1 file changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -1016,23 +1016,13 @@ def mkdirs(newdir, mode=0o777):
1016
1016
if six .PY3 :
1017
1017
os .makedirs (newdir , mode = mode , exist_ok = True )
1018
1018
return
1019
-
1020
-
1021
- def _make_leaf (newdir , mode ):
1022
- if os .path .exists (newdir ):
1023
- return
1024
- try :
1025
- os .makedirs (thispart , mode )
1026
- except OSError as err :
1027
- # Reraise the error unless it's about an already existing directory
1028
- if err .errno != errno .EEXIST or not os .path .isdir (newdir ):
1029
- raise
1030
-
1031
- parts = os .path .split (newdir )
1032
- for i in range (1 , len (parts ) + 1 ):
1033
- thispart = os .path .join (* parts [:i ])
1034
- _make_leaf (thispart , mode )
1035
-
1019
+ # LPY DROP
1020
+ # the rest of this function can be removed when we drop legacy python
1021
+ try :
1022
+ os .makedirs (newdir , mode = mode )
1023
+ except OSError as exception :
1024
+ if exception .errno != errno .EEXIST :
1025
+ raise
1036
1026
1037
1027
class GetRealpathAndStat (object ):
1038
1028
def __init__ (self ):
You can’t perform that action at this time.
0 commit comments