Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceaa7de commit 151db47Copy full SHA for 151db47
lib/matplotlib/cbook.py
@@ -1013,16 +1013,15 @@ def mkdirs(newdir, mode=0o777):
1013
> chmod MODE NEWDIR
1014
"""
1015
# this functionality is now in core python as of 3.2
1016
+ # LPY DROP
1017
if six.PY3:
1018
os.makedirs(newdir, mode=mode, exist_ok=True)
- return
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
+ else:
+ try:
+ os.makedirs(newdir, mode=mode)
+ except OSError as exception:
+ if exception.errno != errno.EEXIST:
+ raise
1026
1027
class GetRealpathAndStat(object):
1028
def __init__(self):
0 commit comments