Fix error when date and time are empty

svn: r17736
This commit is contained in:
Nick Hall 2011-06-09 22:35:44 +00:00
parent cdcc030bf0
commit 6c3013d764

View File

@ -1691,6 +1691,9 @@ def _parse_datetime(value):
Parse date and time and return a datetime object.
"""
value = value.rstrip()
if not value:
return None
if value.find(u':') >= 0:
# Time part present
if value.find(u' ') >= 0: