diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-01-06 00:04:52 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-01-06 00:04:52 (GMT) |
commit | 621d7fd5839732cec2b5c23b64ed30618960ce61 (patch) | |
tree | e582c4aad0c16ae9e2db4b1414ec405c13004672 /Lib/urllib2.py | |
parent | 0f3a71dab1c17c0667ddf6992c599afe1ed68223 (diff) | |
download | cpython-621d7fd5839732cec2b5c23b64ed30618960ce61.zip cpython-621d7fd5839732cec2b5c23b64ed30618960ce61.tar.gz cpython-621d7fd5839732cec2b5c23b64ed30618960ce61.tar.bz2 |
Issue #6500: Fix "maximum recursion depth exceeded" error caused by Request.__getattr__()
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r-- | Lib/urllib2.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 9277b1d..1ae229e 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -251,8 +251,7 @@ class Request: if attr[:12] == '_Request__r_': name = attr[12:] if hasattr(Request, 'get_' + name): - getattr(self, 'get_' + name)() - return getattr(self, attr) + return getattr(self, 'get_' + name)() raise AttributeError, attr def get_method(self): |