mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 23:42:37 +03:00
provide warning if config items will not preserve order
If a group of items are enclosed in {}, then that will be a Python set, which does not preserve order. To preserve order, the data must be either a tuple () or list [].
This commit is contained in:
parent
388c336e76
commit
4e39621601
2 changed files with 7 additions and 1 deletions
|
@ -221,6 +221,12 @@ def read_config(opts, config_file='config.py'):
|
|||
logging.critical("Missing config file - is this a repo directory?")
|
||||
sys.exit(2)
|
||||
|
||||
for k in ('mirrors', 'install_list', 'uninstall_list', 'serverwebroot', 'servergitroot'):
|
||||
if k in config:
|
||||
if not type(config[k]) in (str, list, tuple):
|
||||
logging.warn('"' + k + '" will be in random order!'
|
||||
+ ' Use () or [] brackets if order is important!')
|
||||
|
||||
# smartcardoptions must be a list since its command line args for Popen
|
||||
if 'smartcardoptions' in config:
|
||||
config['smartcardoptions'] = config['smartcardoptions'].split(' ')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue