On Feb 4, 1:08 pm, MajorProgamming <sefira...@gmail.com> wrote:
> Is this the proper way to handle Download Errors from urlfetch (which
> happen quite often in my app)?
>
> try:
>   result = urlfetch.fetch(url=url)
> except DownloadError:
>   #return an error
>
> Basically a coding/python question....
>
Yes, just don't forget to add this to your imports:

from google.appengine.api.urlfetch import DownloadError

> Also, would it work to except, and try again within that same test?
>
> For example,
>
> except DownloadError:
>   result = urlfetch.fetch(url=url)

Check this thread: http://tr.im/eh8e

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to