changeset 34280:2bdd55abd56c

bundle2: portably grab first byte of part name for letter check
author Augie Fackler <augie@google.com>
date Tue, 19 Sep 2017 00:27:55 -0400
parents 047f2af8ceb0
children c9eabc37bb98
files mercurial/bundle2.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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))