How to except the unexpected?
reply.in.the.newsgroup at my.address.is.invalid
Sat Mar 4 12:32:40 CET 2006
>Which suggests that "try: except HTTPException:" will be specific enough
>as a catchall for this module.
>The following, then, should catch everything you mentioned except the
Your conclusion may be (almost) right in this case. I just don't like this
approach. Basically this is reverse engineering the interface from the
source at the time of writing the app. Even if you get it right, it may
fail next week when someone added an exception to a module.
>But it seems to me that working with the internet as you are doing is
>fraught with peril anyway.
Why? It shouldn't be.
More information about the Python-list