fix cmdline arguments not overriding extractor-downloader options

This commit is contained in:
Mike Fährmann
2025-02-22 17:40:27 +01:00
parent 18ed39c1cf
commit 613f05afa3
2 changed files with 8 additions and 4 deletions

View File

@@ -10,6 +10,7 @@
import os
from .. import config, util
_config = config._config
class DownloaderBase():
@@ -44,7 +45,9 @@ class DownloaderBase():
"""Interpolate downloader config value for 'key'"""
return config.interpolate(("downloader", self.scheme), key, default)
def config_opts(self, key, default=None):
def config_opts(self, key, default=None, conf=_config):
if key in conf:
return conf[key]
value = self.opts.get(key, util.SENTINEL)
if value is not util.SENTINEL:
return value