mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 07:22:29 +03:00
add git repo mirroring
This commit is contained in:
parent
fc433c803b
commit
5a9bcfbbf4
4 changed files with 92 additions and 2 deletions
|
@ -262,6 +262,15 @@ def read_config(opts, config_file='config.py'):
|
|||
rootlist.append(rootstr.replace('//', '/'))
|
||||
config['serverwebroot'] = rootlist
|
||||
|
||||
if 'servergitmirrors' in config:
|
||||
if isinstance(config['servergitmirrors'], str):
|
||||
roots = [config['servergitmirrors']]
|
||||
elif all(isinstance(item, str) for item in config['servergitmirrors']):
|
||||
roots = config['servergitmirrors']
|
||||
else:
|
||||
raise TypeError('only accepts strings, lists, and tuples')
|
||||
config['servergitmirrors'] = roots
|
||||
|
||||
return config
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue