libo26 / feedparser

Automatically exported from code.google.com/p/feedparser
Other
0 stars 0 forks source link

feedparser catches KeyboardInterrupt and SystemExit exceptions #249

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Originally reported by Jakub Wilk at the Debian project on 30 Nov 2009:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=558766

The problem boils down to catch-all exceptions:

  try:
      raise ZeroDivisionError
  except: # should only catch possible exceptions, not *all* of them
      pass

This problem has been on my radar, but after seeing it's already hit someone 
over a year ago I wanted to link the two reports in some way to help clear out 
Debian's bug reports, too. This won't go into the 5.0 release, but will 
hopefully be in the release after that.

Original issue reported on code.google.com by kurtmckee on 23 Jan 2011 at 3:03

GoogleCodeExporter commented 9 years ago
This has basically been fixed as of r498 (or thereabouts). There are two 
exceptions:

I haven't tested the tidy code, and I have no idea what exceptions each tidy 
library might raise. Additionally, there is still one generic exception in 
`parse()`. I'm pretty sure that this could be removed, but "pretty sure" isn't 
good enough, so I'm leaving it in until it's known that `_open_resource()` and 
the subsequent `read()` won't cause a crash.

Original comment by kurtmckee on 27 Apr 2011 at 12:17