title: How to retry urlfetch.fetch a few more times in case of error?
body: <p>Quite often GAE is not able to upload the file and I am getting the following error:</p>
  
  <pre><code>ApplicationError: 2
  Traceback (most recent call last):
    File "/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 636, in __call__
      handler.post(*groups)
    File "/base/data/home/apps/picasa2vkontakte/1.348093606241250361/picasa2vkontakte.py", line 109, in post
      headers=headers
    File "/base/python_runtime/python_lib/versions/1/google/appengine/api/urlfetch.py", line 260, in fetch
      return rpc.get_result()
    File "/base/python_runtime/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 592, in get_result
      return self.__get_result_hook(self)
    File "/base/python_runtime/python_lib/versions/1/google/appengine/api/urlfetch.py", line 355, in _get_fetch_result
      raise DownloadError(str(err))
  DownloadError: ApplicationError: 2
  </code></pre>
  
  <p>How should I perform retries in case of such error?</p>
  
  <pre><code>        try:
              result = urlfetch.fetch(url=self.request.get('upload_url'), 
                                      payload=''.join(data),
                                      method=urlfetch.POST,
                                      headers=headers
                                      )
          except DownloadError:
              # how to retry 2 more times?
          # and how to verify result here?
  </code></pre>