Commit 4a106ee9 authored by Barry Warsaw's avatar Barry Warsaw

parsedate_tz(): If data is false, return None. Fixes bug #478115,

IndexError when a Date: field exists with an empty value.
parent bf5ca65c
......@@ -858,6 +858,8 @@ def parsedate_tz(data):
Accounts for military timezones.
"""
if not data:
return None
data = data.split()
if data[0][-1] in (',', '.') or data[0].lower() in _daynames:
# There's a dayname here. Skip it
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment