From 46462995b9ca8ef9dcfbaf67ce3877cc924f83b2 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Tue, 16 Apr 2013 11:28:34 +0200 Subject: [PATCH] Do not make dir if it exists --- weboob/core/backendscfg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/weboob/core/backendscfg.py b/weboob/core/backendscfg.py index 64d1b235..dde609ba 100644 --- a/weboob/core/backendscfg.py +++ b/weboob/core/backendscfg.py @@ -42,7 +42,8 @@ class BackendsConfig(object): try: mode = os.stat(confpath).st_mode 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': fptr = open(confpath, 'w') fptr.close()