nntplib: how to access NNTP response codes on exceptions?

carroll at tjc.com carroll at tjc.com
Fri Apr 4 17:48:13 EST 2003


On Thu, 03 Apr 2003 10:25:36 GMT, Andrew Markebo
<andrew.markebo at telia.com> wrote:

>If you catch it through something like:
>
> except NNTPTemporaryError, e:
>
>The response is put in e.response, so you can find the code in the
>first three characters.. 

Thanks!

>You might have missed that parameters can be thrown with the
>exceptions, and thats what e is.. an instansiation of a
>NNTPTemporaryError class.

No, I knew that, but the inclusion of the response code in
NNTPTemporaryError is not in the docs.






More information about the Python-list mailing list