# HG changeset patch # User Paul Boddie # Date 1322777081 -3600 # Node ID 7d5033764da08702d7056fff6fd85efce3480c1a # Parent 702fe1513dd826816693fddde50540ce5123a8cd Remove any cache entries for inaccessible remote sources. diff -r 702fe1513dd8 -r 7d5033764da0 EventAggregatorSupport.py --- a/EventAggregatorSupport.py Tue Nov 29 23:12:23 2011 +0100 +++ b/EventAggregatorSupport.py Thu Dec 01 23:04:41 2011 +0100 @@ -1294,9 +1294,10 @@ # Access the remote data source. + cache_entry.open(mode="w") + try: f = urllib2.urlopen(url) - cache_entry.open(mode="w") try: cache_entry.write(url + "\n") cache_entry.write((f.headers.get("content-type") or "") + "\n") @@ -1309,6 +1310,8 @@ # NOTE: This could be reported somewhere. except IOError: + if cache_entry.exists(): + cache_entry.remove() continue # Open the cache entry and read it.