mercurial/hook.py
changeset 32637 4b426ae96ff2
parent 31752 aff7b32b3c05
child 32665 c032e137e494
--- a/mercurial/hook.py	Thu Jun 01 00:00:10 2017 +0530
+++ b/mercurial/hook.py	Thu Jun 01 01:41:34 2017 +0530
@@ -31,7 +31,7 @@
 
     if callable(funcname):
         obj = funcname
-        funcname = obj.__module__ + "." + obj.__name__
+        funcname = pycompat.sysbytes(obj.__module__ + r"." + obj.__name__)
     else:
         d = funcname.rfind('.')
         if d == -1: