I'm building an app that needs to download a file from the
web.  

I'm trying to make sure I catch any issues with the download
but I've run into a problem. 

here's what I have so far:

try:
    urllib.urlretrieve(url,filename)
    print "File: ", filename, " downloaded"
except IOError:
    print "IOError File Not Found: ", url

Pretty straight forward...but what I'm finding is if the
url is pointing to a file that is not there, the server
returns a file that's a web page displaying a 404 error. 

Anyone have any recommendations for handling this? 
-- 

Rene
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to