[Tutor] Unable to catch exception

Kent Johnson kent37 at tds.net
Mon Aug 11 00:45:11 CEST 2008


On Sun, Aug 10, 2008 at 6:16 PM, James <jtp at nc.rr.com> wrote:
> Kent,
>
> I'm not importing BadStatusLine. I'm only importing mechanize, which
> downloads a page repeatedly. From time to time a BadStatusLine
> exception is raised. I'm unsure how to go about catching it.

Try adding
from httplib import BadStatusLine
to the top of your module.

Kent


More information about the Tutor mailing list