mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-12 18:20:11 +01:00
Fixes to config parsers
This commit is contained in:
parent
9a2a0efa41
commit
3825e5aebe
@ -55,7 +55,7 @@ def read_config(opts, config_file='config.py'):
|
||||
if not hasattr(options, 'verbose'):
|
||||
options.verbose = False
|
||||
|
||||
config = {
|
||||
defconfig = {
|
||||
'build_server_always': False,
|
||||
'mvn3': "mvn3",
|
||||
'archive_older': 0,
|
||||
@ -66,6 +66,8 @@ def read_config(opts, config_file='config.py'):
|
||||
'stats_to_carbon': False,
|
||||
'repo_maxage': 0
|
||||
}
|
||||
config = {}
|
||||
|
||||
if options.verbose:
|
||||
print "Reading %s..." % config_file
|
||||
execfile(config_file, config)
|
||||
@ -98,6 +100,10 @@ def read_config(opts, config_file='config.py'):
|
||||
print "ERROR: No such directory found for %s: %s" % (key, val)
|
||||
sys.exit(3)
|
||||
|
||||
for k, v in defconfig.items():
|
||||
if k not in config:
|
||||
config[k] = v
|
||||
|
||||
return config
|
||||
|
||||
def getapkname(app, build):
|
||||
|
@ -5,7 +5,6 @@ import sys
|
||||
import subprocess
|
||||
import time
|
||||
from optparse import OptionParser
|
||||
from fdroidserver import common
|
||||
|
||||
def vagrant(params, cwd=None, printout=False):
|
||||
"""Run vagrant.
|
||||
@ -42,7 +41,8 @@ parser.add_option("-c", "--clean", action="store_true", default=False,
|
||||
help="Build from scratch, rather than attempting to update the existing server")
|
||||
options, args = parser.parse_args()
|
||||
|
||||
config = common.read_config(options, 'makebs.config.py')
|
||||
config = {}
|
||||
execfile('makebs.config.py', config)
|
||||
|
||||
if not os.path.exists('makebuildserver.py') or not os.path.exists(serverdir):
|
||||
print 'This must be run from the correct directory!'
|
||||
|
Loading…
Reference in New Issue
Block a user