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

alex.gaynor (Alex Gaynor) phabricator at mercurial-scm.org
Wed Aug 23 01:10:15 UTC 2017


alex.gaynor created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

BRANCH
  py3k-stuff (bookmark) on default (branch)

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

AFFECTED FILES
  mercurial/bundle2.py

CHANGE DETAILS

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()]



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


More information about the Mercurial-devel mailing list