Patchwork D482: bundle2: fixed usage of an attribute that was removed in py3k

login
register
mail settings
Submitter phabricator
Date Aug. 23, 2017, 3:40 p.m.
Message ID <4c58f91f05c26130968584ae8be9b784@localhost.localdomain>
Download mbox | patch
Permalink /patch/23253/
State Not Applicable
Headers show

Comments

phabricator - Aug. 23, 2017, 3:40 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG8d75b9effa07: bundle2: fixed usage of an attribute that was removed in py3k (authored by alex.gaynor).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D482?vs=1164&id=1201

REVISION DETAIL
  https://phab.mercurial-scm.org/D482

AFFECTED FILES
  mercurial/bundle2.py

CHANGE DETAILS




To: alex.gaynor, durin42, #hg-reviewers, indygreg
Cc: lothiraldan, indygreg, mercurial-devel

Patch

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -587,7 +587,7 @@ 
         """add a stream level parameter"""
         if not name:
             raise ValueError('empty parameter name')
-        if name[0] not in string.letters:
+        if name[0] not in pycompat.bytestr(string.ascii_letters):
             raise ValueError('non letter first character: %r' % name)
         self._params.append((name, value))
 
@@ -765,7 +765,7 @@ 
         """
         if not name:
             raise ValueError('empty parameter name')
-        if name[0] not in string.letters:
+        if name[0] not in pycompat.bytestr(string.ascii_letters):
             raise ValueError('non letter first character: %r' % name)
         try:
             handler = b2streamparamsmap[name.lower()]