how to handle network failures

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sun Oct 10 06:52:24 CEST 2010

In message <m2lj67af14.fsf at>, Diez B. Roggisch wrote:

> for n in xrange(max_number_of_retries):
>     try:
>         f=urllib.urlopen(self.url)
>         data =
>         break # exist the loop if all
>     except IOError:
>         pass

Is it worth delaying before retrying? In case of a transient routing error, 
that kind of thing.

More information about the Python-list mailing list