scmutil: make function name bytes in class filecache
authorPulkit Goyal <7895pulkit@gmail.com>
Thu, 16 Mar 2017 06:32:33 +0530
changeset 31419 1fc3d1f02865
parent 31418 fb1b5cd17664
child 31420 40704098853f
scmutil: make function name bytes in class filecache func.__name__ returns unicodes and this leads to keyerror when we try to do filecache[''] by passing bytes.
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Wed Mar 15 00:27:17 2017 -0700
+++ b/mercurial/scmutil.py	Thu Mar 16 06:32:33 2017 +0530
@@ -885,7 +885,7 @@
 
     def __call__(self, func):
         self.func = func
-        self.name = func.__name__
+        self.name = func.__name__.encode('ascii')
         return self
 
     def __get__(self, obj, type=None):