[1.6.x] Tested exc_type instead of exc_value in __exit__.
[1.6.x] Tested exc_type instead of exc_value in __exit__.

exc_value might be None even though there's an exception, at least on
Python 2.6. Thanks Thomas Chaumeny for the report.

Fixed #21034.

dex4er/django,dex4er/django,django-nonrel/django,felixjimenez/django,felixjimenez/django,felixjimenez/django,django-nonrel/django,django-nonrel/django,redhat-openstack/django,redhat-openstack/django,dex4er/django,redhat-openstack/django,redhat-openstack/django,felixjimenez/django,django-nonrel/django