py3: cast attribute name to sysstr in clearcachedproperty()
authorYuya Nishihara <yuya@tcha.org>
Thu, 22 Nov 2018 22:40:22 +0900
changeset 40689 475921a3028c
parent 40688 0d8425311f2f
child 40690 efd0f79246e3
py3: cast attribute name to sysstr in clearcachedproperty()
mercurial/util.py
--- a/mercurial/util.py	Wed Nov 21 19:12:12 2018 +0300
+++ b/mercurial/util.py	Thu Nov 22 22:40:22 2018 +0900
@@ -1535,6 +1535,7 @@
 
 def clearcachedproperty(obj, prop):
     '''clear a cached property value, if one has been set'''
+    prop = pycompat.sysstr(prop)
     if prop in obj.__dict__:
         del obj.__dict__[prop]