#19708: django.utils.timezone.override helper may raise AttributeError
-------------------------------+----------------------------
     Reporter:  rafales        |      Owner:  rafales
         Type:  Bug            |     Status:  new
    Component:  Uncategorized  |    Version:  1.4
     Severity:  Normal         |   Keywords:  timezone utils
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+----------------------------
 Here's a simple test case:
 {{{
 >>> from django.utils import timezone
 >>> timezone.deactivate()
 >>> with timezone.override(None):
 ...     pass
 ...
 Traceback (most recent call last):
   File "<console>", line 2, in <module>
   File "/django/django/utils/timezone.py", line 204, in __exit__
     del _active.value
 AttributeError: value
 }}}

 This happens in {{{__exit__()}}} method of override helper when current
 timezone is deactivated and we try to use override with None argument
 (which is valid - it means that we want to deactivate current timezone).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19708>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to