Rework eve_proxy to remove dependancy on eve_api and allow it to handle downtime situations better

This commit is contained in:
2010-11-10 11:36:28 +00:00
parent c6429a4e56
commit 1e52c87a46
5 changed files with 117 additions and 147 deletions

View File

@@ -82,13 +82,11 @@ class EVEPlayerCorporationManager(models.Manager):
# Convert incoming data to UTF-8.
dom = minidom.parseString(corp_doc.body.encode('utf-8'))
error_node = dom.getElementsByTagName('error')
# If there's an error, see if it's because the corp doesn't exist.
if error_node:
error_code = error_node[0].getAttribute('code')
if error_code == '523':
if error_node[0].getAttribute('code') == '523':
raise InvalidCorpID(id)
return dom