changeset 33178:a0068f49b5f6

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.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 01 Jul 2017 21:57:17 +0200
parents be723e2afd3d
children 95c57596b380
files hgext/zeroconf/__init__.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/zeroconf/__init__.py	Sat Jul 01 20:16:54 2017 +0200
+++ b/hgext/zeroconf/__init__.py	Sat Jul 01 21:57:17 2017 +0200
@@ -167,12 +167,12 @@
                                   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)