#32740: Running colorama.init() at import time causes deployment error
---------------------------------+--------------------------------------
     Reporter:  Leon Matthews    |                    Owner:  nobody
         Type:  Uncategorized    |                   Status:  new
    Component:  Core (Other)     |                  Version:  3.2
     Severity:  Normal           |               Resolution:
     Keywords:  apache mod_wsgi  |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Carlton Gibson):

 Mariusz suggested in conversation that  we might catch the exception,
 something like:

 {{{
 try:
     import colorama
 except ImportError:
     HAS_COLORAMA = False
 else:
     try:
         colorama.init()
     except:
         # Would we want to at least log something here?
         HAS_COLORAMA = False
     else:
         HAS_COLORAMA = True
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32740#comment:3>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.2c3162475d99ef1c5a14004bd41eb412%40djangoproject.com.

Reply via email to