Try and ignore people updating with invalid keys

This commit is contained in:
2011-09-02 14:23:27 +01:00
parent a69b60aaa9
commit f0ea081638

View File

@@ -133,6 +133,10 @@ def import_apikey_func(api_userid, api_key, user=None, force_cache=False, log=lo
if not account:
return
if not account.api_key == api_key:
# Attempted change of key failed, ignore
return
error = doc['error']['code']
if int(error) >= 500:
# API disabled, down or rejecting, return without changes
@@ -187,6 +191,10 @@ def import_apikey_func(api_userid, api_key, user=None, force_cache=False, log=lo
if not account:
return
if not account.api_key == api_key:
# Attempted change of key failed, ignore
return
error = doc['error']['code']
if int(error) >= 500:
# API disabled, down or rejecting, return without changes