On 14 нояб, 18:12, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Fri, 14 Nov 2008 06:35:27 -0800, konstantin wrote: > > Hi, > > > I wonder if there is a safe way to download page with urllib2. I've > > constructed following method to catch all possible exceptions. > > See here: > > http://niallohiggins.com/2008/04/05/python-and-poor-documentation- > urllib2urlopen-exception-layering-problems/ > > There are probably others as well... I seem to recall getting > socket.error at some point myself. > > -- > Steven
Thanks. It's a nice post. But it seems there is no clear solution. I remember I've caught IOError and ValueError as well. I think urllib2 needs some unification on exception handling. It breaks simplicity and this is no good. But anyway, thanks. ps Maybe I could contribute to this module but I do not really know how and where to start. -- http://mail.python.org/mailman/listinfo/python-list