web.datestr(None) should return None, not crash

Bug #346742 reported by Aaron Swartz
2
Affects Status Importance Assigned to Milestone
web.py
Fix Released
Medium
Anand Chitipothu

Bug Description

>>> web.datestr(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sw/lib/python2.5/site-packages/web/utils.py", line 534, in datestr
    delta = now - then
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'NoneType'

Should return None instead.

Aaron Swartz (aaronsw)
Changed in webpy:
assignee: nobody → anandology
importance: Undecided → Medium
milestone: none → 0.32
status: New → Confirmed
Changed in webpy:
status: Confirmed → Fix Committed
Changed in webpy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.