extensions: use [0:1] slice on config path instead of [0]
authorAugie Fackler <raf@durin42.com>
Fri, 03 Mar 2017 13:32:10 -0500
changeset 31264 063d7957fa12
parent 31263 d79761fe697f
child 31265 79715ba22f9c
extensions: use [0:1] slice on config path instead of [0] This behaves the same in Python 2 and Python 3, even though the path is a bytes.
mercurial/extensions.py
--- a/mercurial/extensions.py	Fri Mar 03 13:27:21 2017 -0500
+++ b/mercurial/extensions.py	Fri Mar 03 13:32:10 2017 -0500
@@ -160,7 +160,7 @@
     newindex = len(_order)
     for (name, path) in result:
         if path:
-            if path[0] == '!':
+            if path[0:1] == '!':
                 _disabledextensions[name] = path[1:]
                 continue
         try: