chiark / gitweb /
common: allow starting without a config file
authorMarcus Hoffmann <bubuiic@aol.com>
Tue, 12 Sep 2017 14:21:29 +0000 (16:21 +0200)
committerMarcus Hoffmann <bubuiic@aol.com>
Thu, 14 Sep 2017 00:15:57 +0000 (02:15 +0200)
There is no reason this should be disallowed as the default config often
works well when building simple apps.

fdroidserver/common.py

index fe0462c787716973d3a2ca71f0dd916c578e63bc..6e4e5d8dbf543aa29cec8fe5a31cfd8d902f7f01 100644 (file)
@@ -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: