diff --git a/vobject/icalendar.py b/vobject/icalendar.py index a44fffb..ba5f073 100644 --- a/vobject/icalendar.py +++ b/vobject/icalendar.py @@ -1913,13 +1913,15 @@ def error(msg): sec)) current = "" sign = None - week = None - day = None - hour = None - minute = None - sec = None + week = 0 + day = 0 + hour = 0 + minute = 0 + sec = 0 elif char == "eof": state = "end" + if not current: + second = '0' else: state = "error" error("got unexpected character reading in duration: " + s)