changeset 31419:1fc3d1f02865

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.
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 16 Mar 2017 06:32:33 +0530
parents fb1b5cd17664
children 40704098853f
files mercurial/scmutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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):