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