Patchwork [03,of,10,py3] error: use r-string to properly pop hints from **kw

login
register
mail settings
Submitter Augie Fackler
Date March 19, 2017, 6:26 p.m.
Message ID <9c25b4e6ab7bf364a101.1489947976@imladris.local>
Download mbox | patch
Permalink /patch/19451/
State Accepted
Headers show

Comments

Augie Fackler - March 19, 2017, 6:26 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1489899762 14400
#      Sun Mar 19 01:02:42 2017 -0400
# Node ID 9c25b4e6ab7bf364a101d8a0bc7c8a196131add8
# Parent  dec51b4b12490adab91d55d46c9db0cb77637a28
error: use r-string to properly pop hints from **kw

Fixes the hint mixin on Python 3.

Patch

diff --git a/mercurial/error.py b/mercurial/error.py
--- a/mercurial/error.py
+++ b/mercurial/error.py
@@ -22,7 +22,7 @@  class Hint(object):
     pass remaining arguments to the exception class.
     """
     def __init__(self, *args, **kw):
-        self.hint = kw.pop('hint', None)
+        self.hint = kw.pop(r'hint', None)
         super(Hint, self).__init__(*args, **kw)
 
 class RevlogError(Hint, Exception):