code comment, changelog reformat

pull/183/head
Johannes Raggam 2016-02-05 13:06:19 +01:00
rodzic d9264e90c0
commit 5eb5476741
2 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -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``.

Wyświetl plik

@ -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