1.1 --- a/EventAggregatorSupport.py Tue Nov 29 23:12:23 2011 +0100
1.2 +++ b/EventAggregatorSupport.py Thu Dec 01 23:04:41 2011 +0100
1.3 @@ -1294,9 +1294,10 @@
1.4
1.5 # Access the remote data source.
1.6
1.7 + cache_entry.open(mode="w")
1.8 +
1.9 try:
1.10 f = urllib2.urlopen(url)
1.11 - cache_entry.open(mode="w")
1.12 try:
1.13 cache_entry.write(url + "\n")
1.14 cache_entry.write((f.headers.get("content-type") or "") + "\n")
1.15 @@ -1309,6 +1310,8 @@
1.16 # NOTE: This could be reported somewhere.
1.17
1.18 except IOError:
1.19 + if cache_entry.exists():
1.20 + cache_entry.remove()
1.21 continue
1.22
1.23 # Open the cache entry and read it.