py3: convert return values of inspect.getabsfile() to bytes
authorPulkit Goyal <pulkit@yandex-team.ru>
Thu, 28 Feb 2019 04:08:47 +0530
changeset 41816 78027e7bc544
parent 41815 c7fc463b8e8e
child 41817 169c386cc9d8
py3: convert return values of inspect.getabsfile() to bytes It's weird that python docs for inspect does not mention getabsfile(). Differential Revision: https://phab.mercurial-scm.org/D6033
mercurial/chgserver.py
--- a/mercurial/chgserver.py	Thu Feb 28 03:51:06 2019 +0530
+++ b/mercurial/chgserver.py	Thu Feb 28 04:08:47 2019 +0530
@@ -140,7 +140,7 @@
     files = [pycompat.sysexecutable]
     for m in modules:
         try:
-            files.append(inspect.getabsfile(m))
+            files.append(pycompat.fsencode(inspect.getabsfile(m)))
         except TypeError:
             pass
     return sorted(set(files))