From 359c4ec87967683fd25f07ddb7db6872b5290bb1 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Fri, 5 Apr 2013 18:25:42 +0200 Subject: [PATCH] Create containing directory This might happen when WEBOOB_BACKENDS is outside of the WEBOOB_WORKDIR. --- weboob/core/backendscfg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/weboob/core/backendscfg.py b/weboob/core/backendscfg.py index 290f1dc6..64d1b235 100644 --- a/weboob/core/backendscfg.py +++ b/weboob/core/backendscfg.py @@ -42,6 +42,7 @@ class BackendsConfig(object): try: mode = os.stat(confpath).st_mode except OSError: + os.makedirs(os.path.dirname(confpath)) if sys.platform == 'win32': fptr = open(confpath, 'w') fptr.close()