1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #19456 -- Avoid infinite recursion when tracing LazyObject.__init__.

Thanks blaze33 for the patch.
This commit is contained in:
Aymeric Augustin
2013-03-18 11:22:43 +01:00
parent 0efafa4c54
commit 9dc5702932
2 changed files with 18 additions and 0 deletions

View File

@@ -222,6 +222,10 @@ class LazyObject(object):
By subclassing, you have the opportunity to intercept and alter the
instantiation. If you don't need to do that, use SimpleLazyObject.
"""
# Avoid infinite recursion when tracing __init__ (#19456).
_wrapped = None
def __init__(self):
self._wrapped = empty