1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-14 11:00:10 +01:00

common: allow starting without a config file

There is no reason this should be disallowed as the default config often
works well when building simple apps.
This commit is contained in:
Marcus Hoffmann 2017-09-12 16:21:29 +02:00
parent feadc6a565
commit 190a2fde81

View File

@ -238,8 +238,8 @@ def read_config(opts, config_file='config.py'):
with io.open(config_file, "rb") as f: with io.open(config_file, "rb") as f:
code = compile(f.read(), config_file, 'exec') code = compile(f.read(), config_file, 'exec')
exec(code, None, config) exec(code, None, config)
elif len(get_local_metadata_files()) == 0: else:
raise FDroidException("Missing config file - is this a repo directory?") logging.debug("No config.py found - using defaults.")
for k in ('mirrors', 'install_list', 'uninstall_list', 'serverwebroot', 'servergitroot'): for k in ('mirrors', 'install_list', 'uninstall_list', 'serverwebroot', 'servergitroot'):
if k in config: if k in config: