config: Collect updatable localdb files to 'localdb_files' key

This commit is contained in:
Teemu Ikonen
2023-06-09 18:53:20 +03:00
parent 416bb5086f
commit 26fc63ff18

View File

@@ -190,6 +190,17 @@ def get_config():
if b.get('type', '') in ('m8b',)): if b.get('type', '') in ('m8b',)):
fix_datapath(wconf, 'datafile') fix_datapath(wconf, 'datafile')
# Store updatable localdb files
localdb_files = []
for wconf in (b for b in conf.get('resolver', {}).values()
if b.get('type', '') in ('localdb',)):
if wconf.get('update', False):
dbfile = wconf.get('db')
if dbfile is not None:
localdb_files.append(dbfile)
conf['localdb_files'] = localdb_files
return conf return conf