seomoz/reppy — pull request #9 by DavidBarts (2014-01-23 00:52:17+00:00)
Title: Surface HTTP error codes when throwing ServerError, add more tests

Code review requested for a deploy on Monday:

The ServerError exception now includes a .status attribute in the case where it is being thrown as the result of an HTTP status code that reppy takes offense at. This is to facilitate other code being able to take specific sorts of actions (not fetching things further, considering fetching fully allowed, etc.) for specific HTTP status codes. I chose this solution as opposed to changing how Reppy interprets various status codes to minimize the disruption to any code which calls Reppy.

Martin pointed out to me where Mozscape has its tests for its robots.txt parsing. I decided to translate those tests into Python and incorporate them into the Reppy test suite.