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):
2.1 --- a/actions/EventAggregatorSummary.py Wed Aug 10 00:59:02 2011 +0200
2.2 +++ b/actions/EventAggregatorSummary.py Wed Aug 10 01:03:14 2011 +0200
2.3 @@ -45,7 +45,7 @@
2.4 sources_list = []
2.5 sources = form.get("source", [])
2.6
2.7 - for source_name in getAllEventSources(request).keys():
2.8 + for source_name in (getAllEventSources(request) or {}).keys():
2.9
2.10 selected = self._get_selected_for_list(source_name, sources)
2.11
3.1 --- a/pages/EventTemplate Wed Aug 10 00:59:02 2011 +0200
3.2 +++ b/pages/EventTemplate Wed Aug 10 01:03:14 2011 +0200
3.3 @@ -4,6 +4,7 @@
3.4 Description:: a brief description of the event for the RSS feed
3.5 Link:: a link to a Web site for the event
3.6 Location:: the event location
3.7 + Geo:: any explicit latitude and longitude
3.8 ## Summary:: summary/title
3.9 ## To choose a title or summary different to the page name, or to
3.10 ## provide a specific form of the page name, uncomment the above entry