Commit 674ad139 authored by Nicolas Wavrant's avatar Nicolas Wavrant

bug fix : the slapos repo couldn't be downloaded if no user had registered

parent 0f38ef39
......@@ -150,9 +150,9 @@ def serve(config):
os.mkdir(workdir)
if not os.path.exists(software_link):
os.mkdir(software_link)
cloneDefaultGit(app.config)
slapos.runner.process.setHandler()
config.logger.info('Running slapgrid...')
cloneDefaultGit(app.config)
runInstanceWithLock(app.config)
config.logger.info('Done.')
app.wsgi_app = ProxyFix(app.wsgi_app)
......
......@@ -809,13 +809,9 @@ def cloneDefaultGit(config):
"""Test if the slapos git has been downloaded yet
If not, download it in read-only mode"""
slap = os.path.join(config['runner_workdir'], 'project', 'slapos')
slap_ro = os.path.join(config['runner_workdir'], 'project', 'slapos-readonly')
if not os.path.exists(slap_ro) or not os.path.exists(slap_ro):
if not os.path.exists(slap):
from gittools import cloneRepo
user = getSession(config)
data = {'path': slap_ro,
data = {'path': slap,
'repo': 'http://git.erp5.org/repos/slapos.git',
'email': user[2],
'user': user[3],
}
cloneRepo(data)
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