From: Marcus Hoffmann Date: Tue, 12 Sep 2017 14:21:29 +0000 (+0200) Subject: common: allow starting without a config file X-Git-Tag: 0.9~78^2~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=fdroidserver.git;a=commitdiff_plain;h=190a2fde814eaa0e00fb0447df521bc241ee3f54 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. --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index fe0462c7..6e4e5d8d 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -238,8 +238,8 @@ def read_config(opts, config_file='config.py'): with io.open(config_file, "rb") as f: code = compile(f.read(), config_file, 'exec') exec(code, None, config) - elif len(get_local_metadata_files()) == 0: - raise FDroidException("Missing config file - is this a repo directory?") + else: + logging.debug("No config.py found - using defaults.") for k in ('mirrors', 'install_list', 'uninstall_list', 'serverwebroot', 'servergitroot'): if k in config: