1.1 --- a/MoinRemoteSupport.py Tue Jul 17 00:25:35 2012 +0200
1.2 +++ b/MoinRemoteSupport.py Tue Jul 17 00:28:18 2012 +0200
1.3 @@ -17,6 +17,8 @@
1.4 accessing a cache entry with the given 'arena' and 'scope' where the data
1.5 has already been downloaded. The 'max_cache_age' indicates the length in
1.6 seconds that a cache entry remains valid.
1.7 +
1.8 + If the resource cannot be downloaded and cached, None is returned.
1.9 """
1.10
1.11 # See if the URL is cached.
1.12 @@ -49,13 +51,12 @@
1.13 cache_entry.close()
1.14 f.close()
1.15
1.16 - # In case of an exception, just ignore the remote source.
1.17 - # NOTE: This could be reported somewhere.
1.18 + # In case of an exception, return None.
1.19
1.20 except IOError:
1.21 if cache_entry.exists():
1.22 cache_entry.remove()
1.23 - continue
1.24 + return None
1.25
1.26 # Open the cache entry and read it.
1.27