Patchwork [5,of,8] py3: fix type of attribute names forwarded by templatekw._hybrid

login
register
mail settings
Submitter Yuya Nishihara
Date March 1, 2018, 2:17 p.m.
Message ID <89d47c8b3dc9a4dcc207.1519913832@mimosa>
Download mbox | patch
Permalink /patch/28552/
State Accepted
Headers show

Comments

Yuya Nishihara - March 1, 2018, 2:17 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1519910387 18000
#      Thu Mar 01 08:19:47 2018 -0500
# Node ID 89d47c8b3dc9a4dcc207319b8177440fd5d99d2b
# Parent  63188d7c6282a68518421ef7f60c85b312ffec3b
py3: fix type of attribute names forwarded by templatekw._hybrid

# skip-blame because just r'' prefixes

Patch

diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -64,8 +64,8 @@  class _hybrid(object):
     def __iter__(self):
         return iter(self._values)
     def __getattr__(self, name):
-        if name not in ('get', 'items', 'iteritems', 'iterkeys', 'itervalues',
-                        'keys', 'values'):
+        if name not in (r'get', r'items', r'iteritems', r'iterkeys',
+                        r'itervalues', r'keys', r'values'):
             raise AttributeError(name)
         return getattr(self._values, name)