Ticket #7343: django-update_wrapper-attribute_error.diff

File django-update_wrapper-attribute_error.diff, 624 bytes (added by Jakub Wilk <ubanus@…>, 7 years ago)
  • django/utils/functional.py

     
    9595        except TypeError: # Python 2.3 doesn't allow assigning to __name__.
    9696            pass
    9797    for attr in updated:
    98         getattr(wrapper, attr).update(getattr(wrapped, attr))
     98        try:
     99            getattr(wrapper, attr).update(getattr(wrapped, attr))
     100        except AttributeError:
     101            pass
    99102    # Return the wrapper so this can be used as a decorator via curry()
    100103    return wrapper
    101104
Back to Top