lectroidmarc/SacTraffic — Issue #43: /atom?city=Sacramentox throws error
Author: lectroidmarc
Created: 2011-12-08 19:21:28+00:00
State: open
Labels: Bug

Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine- default.bundle/Contents/Resources/google_appengine/google/appengine/ext/webapp/_webapp25.py", line 701, in __call__
handler.get(*groups)
File "/Users/mmatteo/Development/Lectroid/SacTraffic/appengine/handlers/atom.py", line 43, in get
ElementTree.SubElement(feed, 'updated').text = self.incidents_last_mod.strftime("%Y-%m-%dT%H:%M:%SZ")
AttributeError: 'NoneType' object has no attribute 'strftime'

So: `incident_request.RequestHandler.incidents_last_mod` defaults to none so when there are no incidents (like when a query comes up empty) we try to call strftime on None. Bzzzzzt.