Added a try / except block around placing a urllib2.urlopen(). Additionally, when there is an error I print it and return None. This will tell the cache to remove the opened file.