Commit 7b535833 authored by Laurent Bachelier's avatar Laurent Bachelier 🐧 Committed by Florent Fourcot

Fix local_run with empty localconfig

parent ebb3bd8c
......@@ -9,3 +9,4 @@ dist
tags
docs/source/api
modules/modules.list
/localconfig
......@@ -15,7 +15,7 @@ else:
project = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))
wd = os.path.join(project, 'localconfig')
if not os.path.isdir(wd):
os.path.makedirs(wd)
os.makedirs(wd)
env = os.environ.copy()
env['PYTHONPATH'] = project
......@@ -24,6 +24,7 @@ env['WEBOOB_WORKDIR'] = wd
shutil.copyfile(
os.path.expanduser('~/.config/weboob/backends'),
os.path.join(project, wd, 'backends'))
os.chmod(os.path.join(project, wd, 'backends'), 0600)
with open(os.path.join(wd, 'sources.list'), 'w') as f:
f.write("file://%s\n" % os.path.join(project, 'modules'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment