Commit 8480dbe6 authored by Nicolas Wavrant's avatar Nicolas Wavrant

The new parameter default_repo is more generic.

The git repo slapos is not hardcoded anymore
parent 6e4cf8c3
...@@ -15,6 +15,8 @@ from xml.dom import minidom ...@@ -15,6 +15,8 @@ from xml.dom import minidom
import xml_marshaller import xml_marshaller
from flask import jsonify from flask import jsonify
from gittools import cloneRepo
from slapos.runner.process import Popen, isRunning, killRunningProcess from slapos.runner.process import Popen, isRunning, killRunningProcess
from slapos.htpasswd import HtpasswdFile from slapos.htpasswd import HtpasswdFile
import slapos.slap import slapos.slap
...@@ -806,13 +808,12 @@ def readParameters(path): ...@@ -806,13 +808,12 @@ def readParameters(path):
def cloneDefaultGit(config): def cloneDefaultGit(config):
"""Test if the slapos git has been downloaded yet """Test if the default 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') default_git = os.path.join(config['runner_workdir'], 'project', 'default_repo')
if not os.path.exists(slap): if not os.path.exists(default_git):
from gittools import cloneRepo data = {'path': default_git,
data = {'path': slap, 'repo': config['default_repo'],
'repo': 'http://git.erp5.org/repos/slapos.git',
} }
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