Patchwork D3327: py3: add b'' prefixes to make values bytes

login
register
mail settings
Submitter phabricator
Date April 13, 2018, 10:22 p.m.
Message ID <6b9274b79a0670358185c6785d9e342c@localhost.localdomain>
Download mbox | patch
Permalink /patch/30947/
State Not Applicable
Headers show

Comments

phabricator - April 13, 2018, 10:22 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG46e705b79323: py3: add b&#039;&#039; prefixes to make values bytes (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3327?vs=8147&id=8202

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

AFFECTED FILES
  mercurial/sslutil.py

CHANGE DETAILS




To: pulkit, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py
--- a/mercurial/sslutil.py
+++ b/mercurial/sslutil.py
@@ -621,13 +621,13 @@ 
         pats.append(re.escape(leftmost))
     else:
         # Otherwise, '*' matches any dotless string, e.g. www*
-        pats.append(re.escape(leftmost).replace(r'\*', '[^.]*'))
+        pats.append(re.escape(leftmost).replace(br'\*', '[^.]*'))
 
     # add the remaining fragments, ignore any wildcards
     for frag in remainder:
         pats.append(re.escape(frag))
 
-    pat = re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE)
+    pat = re.compile(br'\A' + br'\.'.join(pats) + br'\Z', re.IGNORECASE)
     return pat.match(hostname) is not None
 
 def _verifycert(cert, hostname):