Do not make dir if it exists
This commit is contained in:
parent
e6156c9e94
commit
46462995b9
1 changed files with 2 additions and 1 deletions
|
|
@ -42,7 +42,8 @@ class BackendsConfig(object):
|
||||||
try:
|
try:
|
||||||
mode = os.stat(confpath).st_mode
|
mode = os.stat(confpath).st_mode
|
||||||
except OSError:
|
except OSError:
|
||||||
os.makedirs(os.path.dirname(confpath))
|
if not os.path.isdir(os.path.dirname(confpath)):
|
||||||
|
os.makedirs(os.path.dirname(confpath))
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
fptr = open(confpath, 'w')
|
fptr = open(confpath, 'w')
|
||||||
fptr.close()
|
fptr.close()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue