#30405: IndexError in _get_lines_from_file when module does not match file 
contents
(via loader)
---------------------------------+--------------------------------------
     Reporter:  Daniel Hahler    |                    Owner:  (none)
         Type:  Bug              |                   Status:  new
    Component:  Error reporting  |                  Version:  2.2
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by Daniel Hahler):

 It happened for me while using pdb, and pdb itself crashed
 (https://github.com/antocuni/pdb/issues/198).

 I am using pdb++/pdbpp, which replaces the original "pdb" module itself
 
(https://github.com/antocuni/pdb/blob/81f8ea9f09d9179aceefe9676e47254a8cd95d05/pdb.py#L140-L154).

 So in general the issue might not be very common, but I wanted to report
 it anyway after investigating, since I think that error handling should be
 robust by itself.

 I guess you could simulate it in a unittest by making
 ``loader.get_source(module_name)`` not match the source.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30405#comment:2>
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.3fc2b0899255e46beb7e755d04fa56e6%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to