Patchwork [3,of,6] bundle2: make ValueError messages native strings

login
register
mail settings
Submitter Augie Fackler
Date Sept. 19, 2017, 4:08 p.m.
Message ID <b4cb774af1c9da914c81.1505837306@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/24018/
State Accepted
Headers show

Comments

Augie Fackler - Sept. 19, 2017, 4:08 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1505757801 14400
#      Mon Sep 18 14:03:21 2017 -0400
# Node ID b4cb774af1c9da914c81e8bf42988828f9807b61
# Parent  43d20140917917f63e9b1d030847260fdf637d8b
bundle2: make ValueError messages native strings

Patch

diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -614,9 +614,9 @@  class bundle20(object):
     def addparam(self, name, value=None):
         """add a stream level parameter"""
         if not name:
-            raise ValueError('empty parameter name')
+            raise ValueError(r'empty parameter name')
         if name[0] not in pycompat.bytestr(string.ascii_letters):
-            raise ValueError('non letter first character: %s' % name)
+            raise ValueError(r'non letter first character: %s' % name)
         self._params.append((name, value))
 
     def addpart(self, part):