mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03:00
Fixes to config parsers
This commit is contained in:
parent
9a2a0efa41
commit
3825e5aebe
2 changed files with 9 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue