From 4d8955052fd5d68f54292f2622130622b6e9eb6b Mon Sep 17 00:00:00 2001 From: tandrii Date: Thu, 18 Aug 2016 08:26:19 -0700 Subject: [PATCH] git cl: avoid infinite recursion during debug/development. R=andybons@chromium.org BUG= Review-Url: https://codereview.chromium.org/2260453002 --- git_cl.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/git_cl.py b/git_cl.py index 9fabcc38b..42af2a77f 100755 --- a/git_cl.py +++ b/git_cl.py @@ -1461,7 +1461,12 @@ class Changelist(object): # This is because lots of untested code accesses Rietveld-specific stuff # directly, and it's hard to fix for sure. So, just let it work, and fix # on a case by case basis. - return getattr(self._codereview_impl, attr) + # Note that child method defines __getattr__ as well, and forwards it here, + # because _RietveldChangelistImpl is not cleaned up yet, and given + # deprecation of Rietveld, it should probably be just removed. + # Until that time, avoid infinite recursion by bypassing __getattr__ + # of implementation class. + return self._codereview_impl.__getattribute__(attr) class _ChangelistCodereviewBase(object):