summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rivera <rivera@joel.mx>2016-03-10 00:14:55 -0600
committerJoel Rivera <rivera@joel.mx>2016-03-10 00:14:55 -0600
commitda1046c39ca7bb7c71c5f5d79f76f1cd9709f25c (patch)
treeeef45ad5fef9dbd805bde4d2c70b274075d1b31d
parenta5b28b151a90cb5ac37710380825abcc0231384a (diff)
downloadcherrypy-da1046c39ca7bb7c71c5f5d79f76f1cd9709f25c.tar.gz
Add support for the direct keywords on the calls (e.g. foo=bar) on python3 for the config parser and also give them preference on top of the **kwargs.
-rw-r--r--cherrypy/lib/reprconf.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cherrypy/lib/reprconf.py b/cherrypy/lib/reprconf.py
index 4b6111f9..8af1f777 100644
--- a/cherrypy/lib/reprconf.py
+++ b/cherrypy/lib/reprconf.py
@@ -427,6 +427,10 @@ class _Builder3:
kwargs = {}
else:
kwargs = self.build(o.kwargs)
+ if o.keywords is not None: # direct a=b keywords
+ for kw in o.keywords:
+ # preference because is a direct keyword against **kwargs
+ kwargs[kw.arg] = self.build(kw.value)
return callee(*(args + starargs), **kwargs)
def build_List(self, o):