mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Further work on issue #27, also enforced utf8 for XML decoding
This commit is contained in:
@@ -27,7 +27,7 @@ def import_eve_account(api_key, user_id):
|
|||||||
params=auth_params,
|
params=auth_params,
|
||||||
no_cache=False)
|
no_cache=False)
|
||||||
|
|
||||||
dom = minidom.parseString(account_doc.body)
|
dom = minidom.parseString(account_doc.body.encode('utf-8'))
|
||||||
|
|
||||||
if dom.getElementsByTagName('error'):
|
if dom.getElementsByTagName('error'):
|
||||||
try:
|
try:
|
||||||
@@ -36,6 +36,7 @@ def import_eve_account(api_key, user_id):
|
|||||||
return
|
return
|
||||||
|
|
||||||
account.api_status = API_STATUS_OTHER_ERROR
|
account.api_status = API_STATUS_OTHER_ERROR
|
||||||
|
account.api_last_updated = datetime.utcnow()
|
||||||
account.save()
|
account.save()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -50,8 +51,8 @@ def import_eve_account(api_key, user_id):
|
|||||||
|
|
||||||
account.api_key = api_key
|
account.api_key = api_key
|
||||||
account.api_user_id = user_id
|
account.api_user_id = user_id
|
||||||
account.api_last_updated = datetime.utcnow()
|
|
||||||
account.api_status = API_STATUS_OK
|
account.api_status = API_STATUS_OK
|
||||||
|
account.api_last_updated = datetime.utcnow()
|
||||||
account.save()
|
account.save()
|
||||||
|
|
||||||
for node in characters_node_children:
|
for node in characters_node_children:
|
||||||
|
|||||||
Reference in New Issue
Block a user