mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 23:12:46 +03:00
scanner: implement caching rules for suss
This commit is contained in:
parent
bfcc30b854
commit
a8bcaa3d70
4 changed files with 78 additions and 57 deletions
|
@ -324,19 +324,26 @@ def fill_config_defaults(thisconfig):
|
|||
thisconfig['gradle_version_dir'] = str(Path(thisconfig['cachedir']) / 'gradle')
|
||||
|
||||
|
||||
def get_config(options=None):
|
||||
def get_config(opts=None):
|
||||
"""
|
||||
helper function for getting access to commons.config while safely
|
||||
initializing if it wasn't initialized yet.
|
||||
"""
|
||||
global config
|
||||
global config, options
|
||||
|
||||
if config is not None:
|
||||
return config
|
||||
|
||||
config = {}
|
||||
common.fill_config_defaults(config)
|
||||
common.read_config(options)
|
||||
common.read_config(opts=opts)
|
||||
|
||||
# make sure these values are available in common.py even if they didn't
|
||||
# declare global in a scope
|
||||
common.config = config
|
||||
if opts is not None:
|
||||
common.options = opts
|
||||
|
||||
return config
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue