2015-02-08 | Paul Boddie | raw files shortlog changelog graph | Return None from get_datetime if the incoming value is a false value. | |
imiptools/dates.py (file) |
1.1 --- a/imiptools/dates.py Sun Feb 08 20:18:08 2015 +0100 1.2 +++ b/imiptools/dates.py Sun Feb 08 21:52:50 2015 +0100 1.3 @@ -132,6 +132,9 @@ 1.4 the 'attr' mapping (if specified) to control the conversion. 1.5 """ 1.6 1.7 + if not value: 1.8 + return None 1.9 + 1.10 if len(value) > 9 and (not attr or attr.get("VALUE") in (None, "DATE-TIME")): 1.11 m = match_datetime_icalendar(value) 1.12 if m: