Django

Code

Changeset 7891

Show
Ignore:
Timestamp:
07/11/08 10:08:09 (4 months ago)
Author:
russellm
Message:

Fixed #7421 -- Corrected the condition used during syncdb to establish that a management module is or isn't available. This is to satisfy non-CPython implementations which can use different error messages. Thanks to Maciej Fijalkowski (fijal) for his help confirming the problem.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/core/management/commands/syncdb.py

    r7889 r7891  
    4242                # can do this is to check the text of the exception. Note that 
    4343                # we're a bit broad in how we check the text, because different 
    44                 # Python implementations may not use the same text. CPython 
    45                 # uses the text "No module named management". 
     44                # Python implementations may not use the same text.  
     45                # CPython uses the text "No module named management" 
     46                # PyPy uses "No module named myproject.myapp.management" 
    4647                msg = exc.args[0] 
    47                 if not msg.startswith('No module named management') or 'management' not in msg: 
     48                if not msg.startswith('No module named') or 'management' not in msg: 
    4849                    raise 
    4950