catch everything

This commit is contained in:
Frédéric Péters 2011-11-15 16:09:36 +01:00
parent 6009a1029e
commit 492d069176
1 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ class IcalImport(BrowserView):
date_end = vevent.dtend.value
if isinstance(date_end, datetime.date):
date_end = datetime.datetime.fromordinal(date_end.toordinal())
except AttributeError:
except:
date_end = None
event_id = self.plone_utils.normalizeString(
'%04d-%02d-%02d-%s' % (date_start.year,
@ -53,11 +53,11 @@ class IcalImport(BrowserView):
event.end = date_end
try:
event.description = vevent.description.value
except AttributeError:
except:
pass
try:
event.location = vevent.location.value
except AttributeError:
except:
pass
try:
self.portal_workflow.doActionFor(getattr(self.context, event_id), 'publish')