Skip to content

Commit

Permalink
Added exception checking for new versions of dateutil.
Browse files Browse the repository at this point in the history
  • Loading branch information
toastdriven committed Nov 3, 2013
1 parent 75ac54d commit 9739a35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tastypie/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ def convert(self, value):
def to_time(self, s):
try:
dt = parse(s)
except ValueError as e:
except (ValueError, TypeError) as e:
raise ApiFieldError(str(e))
else:
return datetime.time(dt.hour, dt.minute, dt.second)
Expand Down

0 comments on commit 9739a35

Please sign in to comment.