bundle2: portably grab first byte of part name for letter check
authorAugie Fackler <augie@google.com>
Tue, 19 Sep 2017 00:27:55 -0400
changeset 34280 2bdd55abd56c
parent 34279 047f2af8ceb0
child 34281 c9eabc37bb98
bundle2: portably grab first byte of part name for letter check
mercurial/bundle2.py
--- a/mercurial/bundle2.py	Mon Sep 18 14:03:21 2017 -0400
+++ b/mercurial/bundle2.py	Tue Sep 19 00:27:55 2017 -0400
@@ -615,7 +615,7 @@
         """add a stream level parameter"""
         if not name:
             raise ValueError(r'empty parameter name')
-        if name[0] not in pycompat.bytestr(string.ascii_letters):
+        if name[0:1] not in pycompat.bytestr(string.ascii_letters):
             raise ValueError(r'non letter first character: %s' % name)
         self._params.append((name, value))