mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-13 22:32:15 +00:00
Raise exceptions correctly
This commit is contained in:
@@ -67,7 +67,7 @@ def import_eve_character_func(character_id, key_id=None, logger=logging.getLogge
|
||||
char_doc = CachedDocument.objects.api_query('/eve/CharacterInfo.xml.aspx', params={'characterID': character_id}, no_cache=False)
|
||||
except DocumentRetrievalError, exc:
|
||||
logger.error('Error retrieving CharacterInfo.xml.aspx for Character ID %s - %s' % (character_id, exc))
|
||||
raise APIAccessException(exc.value)
|
||||
raise APIAccessException('Error retrieving CharacterInfo.xml.aspx for Character ID %s - %s' % (character_id, exc))
|
||||
|
||||
d = basic_xml_parse_doc(char_doc)['eveapi']
|
||||
if 'error' in d:
|
||||
@@ -130,7 +130,7 @@ def import_eve_character_func(character_id, key_id=None, logger=logging.getLogge
|
||||
char_doc = CachedDocument.objects.api_query('/char/CharacterSheet.xml.aspx', params=auth_params, no_cache=False)
|
||||
except DocumentRetrievalError, exc:
|
||||
logger.error('Error retrieving CharacterSheet.xml.aspx for User ID %s, Character ID %s - %s' % (acc.pk, character_id, exc))
|
||||
raise APIAccessException
|
||||
raise APIAccessException('Error retrieving CharacterSheet.xml.aspx for User ID %s, Character ID %s - %s' % (acc.pk, character_id, exc.value))
|
||||
|
||||
doc = basic_xml_parse_doc(char_doc)['eveapi']
|
||||
if not 'error' in doc:
|
||||
|
||||
Reference in New Issue
Block a user