Add some more API error handling into the OpTimer api

This commit is contained in:
2010-10-11 09:58:11 +01:00
parent 7e5b9771a7
commit 5cf49e500d

View File

@@ -126,9 +126,10 @@ class OpTimerHandler(BaseHandler):
cached_doc = CachedDocument.objects.api_query('/char/UpcomingCalendarEvents.xml.aspx', params, exceptions=False)
if cached_doc:
dom = minidom.parseString(cached_doc.body.encode('utf-8'))
enode = dom.getElementsByTagName('error')
if enode:
if not cached_doc or enode:
return {'ops':[{
'startsIn': -1,
'eventID': 0,