changeset 35383:7d2292416046

py3: handle keyword arguments correctly in wireproto.py Differential Revision: https://phab.mercurial-scm.org/D1647
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 10 Dec 2017 04:50:16 +0530
parents 4e377c43e80b
children ea645c6c6d46
files mercurial/wireproto.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireproto.py	Sun Dec 10 04:50:03 2017 +0530
+++ b/mercurial/wireproto.py	Sun Dec 10 04:50:16 2017 +0530
@@ -452,9 +452,9 @@
         # don't pass optional arguments left at their default value
         opts = {}
         if three is not None:
-            opts['three'] = three
+            opts[r'three'] = three
         if four is not None:
-            opts['four'] = four
+            opts[r'four'] = four
         return self._call('debugwireargs', one=one, two=two, **opts)
 
     def _call(self, cmd, **args):
@@ -817,7 +817,7 @@
 def debugwireargs(repo, proto, one, two, others):
     # only accept optional args from the known set
     opts = options('debugwireargs', ['three', 'four'], others)
-    return repo.debugwireargs(one, two, **opts)
+    return repo.debugwireargs(one, two, **pycompat.strkwargs(opts))
 
 @wireprotocommand('getbundle', '*')
 def getbundle(repo, proto, others):