Fixes to config parsers

This commit is contained in:
Daniel Martí 2013-12-06 16:38:46 +01:00
parent 9a2a0efa41
commit 3825e5aebe
2 changed files with 9 additions and 3 deletions

View file

@ -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):