mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +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)
|
||||
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user