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): ...@@ -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)
slapos.runner.process.setHandler() slapos.runner.process.setHandler()'Running slapgrid...')'Running slapgrid...')
runInstanceWithLock(app.config) runInstanceWithLock(app.config)'Done.')'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': '', 'repo': '',
'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 to comment