zeroconf: blindly forward extra argument to the core config method

The new default value handling is simpler if we let the original function handle
everything.
This commit is contained in:
Pierre-Yves David 2017-07-01 21:57:17 +02:00
parent a418240d11
commit d997c3083a

View File

@ -167,12 +167,12 @@ def getzcpaths():
value.properties.get("path", "/"))
yield "zc-" + name, url
def config(orig, self, section, key, default=None, untrusted=False):
def config(orig, self, section, key, *args, **kwargs):
if section == "paths" and key.startswith("zc-"):
for name, path in getzcpaths():
if name == key:
return path
return orig(self, section, key, default, untrusted)
return orig(self, section, key, *args, **kwargs)
def configitems(orig, self, section, *args, **kwargs):
repos = orig(self, section, *args, **kwargs)