I have a urllib2 caching module, which sporadically crashes because of the following code:
if not os.path.exists(self.cache_location): os.mkdir(self.cach
Could you catch the exception and then test whether the file exists as a directory or not?