1.1 --- a/EventAggregatorSupport.py Wed Aug 10 00:59:02 2011 +0200
1.2 +++ b/EventAggregatorSupport.py Wed Aug 10 01:03:14 2011 +0200
1.3 @@ -630,7 +630,10 @@
1.4 # Convert positions (using decimal values).
1.5
1.6 elif property == "GEO":
1.7 - value = map(getMapReferenceFromDecimal, to_list(value, ";"))
1.8 + try:
1.9 + value = map(getMapReferenceFromDecimal, to_list(value, ";"))
1.10 + except (KeyError, ValueError):
1.11 + continue
1.12
1.13 # Accept other textual data as it is.
1.14
1.15 @@ -776,7 +779,10 @@
1.16 # Position details.
1.17
1.18 elif term == "geo":
1.19 - desc = map(getMapReference, to_list(desc, None))
1.20 + try:
1.21 + desc = map(getMapReference, to_list(desc, None))
1.22 + except (KeyError, ValueError):
1.23 + continue
1.24
1.25 # Labels which may well be quoted.
1.26
1.27 @@ -1186,10 +1192,7 @@
1.28
1.29 # Remote sources are accessed via dictionary page definitions.
1.30
1.31 - if request.user.may.read(sources_page):
1.32 - return request.dicts.dict(sources_page)
1.33 - else:
1.34 - return {}
1.35 + return getWikiDict(sources_page, request)
1.36
1.37 def getEventResources(sources, calendar_start, calendar_end, request):
1.38
1.39 @@ -1220,7 +1223,9 @@
1.40 for source in sources:
1.41 try:
1.42 url, format = sources_dict[source].split()
1.43 -
1.44 + except (KeyError, ValueError):
1.45 + pass
1.46 + else:
1.47 # Prevent local file access.
1.48
1.49 if url.startswith("file:"):
1.50 @@ -1292,9 +1297,6 @@
1.51 finally:
1.52 f.close()
1.53
1.54 - except (KeyError, ValueError):
1.55 - pass
1.56 -
1.57 return resources
1.58
1.59 def getEventsFromResources(resources):