[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#717995: RFS: rawdog/2.16-1 [ITA]



Jakub Wilk <jwilk@debian.org> writes:

> rawdog.py:36 - catch ImportError;
> rawdog.py:41 - ditto;

You'll get ImportError if the module's missing. If the module's present
but raises an exception during initialisation then rawdog should still
fall back to the alternative, rather than crashing.

> rawdog.py:297 - catch UnicodeError;

Nope; it's got to deal with the wacky behaviour of any subclass of str,
and a mis-decoded string is preferable to a crash (as it is elsewhere in
rawdog and feedparser).

That bit of code existed originally because BeautifulSoup did highly
entertaining things with string subclassing, and rawdog needs to be
robust in flattening whatever feedparser returns back to standard Python
types so it can reliably pickle them. Strings are less of a concern now
that feedparser's use of BeautifulSoup is explicitly disabled, although
the dict flattening is still important for feedparser's results.

> rawdog.py:1217 - catch AttributeError.

Hmm. The behaviour's the same either way, but it's not consistent: I'm
catching AttributeError in the other places where I'm looking for
attributes added during the 2.x series, so I'll change that in the next
upstream release.

Thanks,

-- 
Adam Sampson <ats@offog.org>                         <http://offog.org/>


Reply to: