mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-17 19:59:29 +00:00
Add some more API error handling into the OpTimer api
This commit is contained in:
@@ -126,9 +126,10 @@ class OpTimerHandler(BaseHandler):
|
|||||||
|
|
||||||
cached_doc = CachedDocument.objects.api_query('/char/UpcomingCalendarEvents.xml.aspx', params, exceptions=False)
|
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'))
|
dom = minidom.parseString(cached_doc.body.encode('utf-8'))
|
||||||
enode = dom.getElementsByTagName('error')
|
enode = dom.getElementsByTagName('error')
|
||||||
if enode:
|
if not cached_doc or enode:
|
||||||
return {'ops':[{
|
return {'ops':[{
|
||||||
'startsIn': -1,
|
'startsIn': -1,
|
||||||
'eventID': 0,
|
'eventID': 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user