kopia lustrzana https://github.com/collective/icalendar
code comment, changelog reformat
rodzic
d9264e90c0
commit
5eb5476741
|
@ -10,13 +10,10 @@ New:
|
|||
|
||||
Fixes:
|
||||
|
||||
- Fixed possible IndexError exception during parsing of an ical string.
|
||||
- Fixed cal.Component.from_ical() representing an unknown component
|
||||
as one of the known.
|
||||
- Fixed cal.Component.from_ical() representing an unknown component as one of the known.
|
||||
[stlaz]
|
||||
|
||||
- Fixed date-time being recognized as date or time during parsing. Added
|
||||
better error handling to parsing from ical strings.
|
||||
- Fixed possible IndexError exception during parsing of an ical string.
|
||||
[stlaz]
|
||||
|
||||
- When doing a boolean test on ``icalendar.cal.Component``, always return ``True``.
|
||||
|
|
|
@ -339,6 +339,10 @@ class Component(CaselessDict):
|
|||
# otherwise get a general Components for robustness.
|
||||
c_name = vals.upper()
|
||||
c_class = component_factory.get(c_name, Component)
|
||||
# If component factory cannot resolve ``c_name``, the generic
|
||||
# ``Component`` class is used which does not have the name set.
|
||||
# That's opposed to the usage of ``cls``, which represents a
|
||||
# more concrete subclass with a name set (e.g. VCALENDAR).
|
||||
component = c_class()
|
||||
if not getattr(component, 'name', ''): # undefined components
|
||||
component.name = c_name
|
||||
|
|
Ładowanie…
Reference in New Issue