ui: fix implicit unicode-to-bytes conversion introduced in 9df29b7c62cf
authorAugie Fackler <augie@google.com>
Thu, 19 Jul 2018 15:21:28 -0400
changeset 38767 eb2945f0a4a1
parent 38766 813e726e5343
child 38768 afc4ad706f9c
ui: fix implicit unicode-to-bytes conversion introduced in 9df29b7c62cf This is harmless, unless you try and run hg with HGUNICODEPEDANTRY enabled. It's technically wrong, so let's go ahead and fix it. Differential Revision: https://phab.mercurial-scm.org/D3989
mercurial/ui.py
--- a/mercurial/ui.py	Wed Aug 01 10:23:57 2018 -0400
+++ b/mercurial/ui.py	Thu Jul 19 15:21:28 2018 -0400
@@ -392,7 +392,7 @@
     def readconfig(self, filename, root=None, trust=False,
                    sections=None, remap=None):
         try:
-            fp = open(filename, u'rb')
+            fp = open(filename, r'rb')
         except IOError:
             if not sections: # ignore unless we were looking for something
                 return