mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-12 05:50:16 +02:00
Fix retry logic being suppressed by try block (#1035)
This commit is contained in:
parent
37bed989f1
commit
b4d33e5dfc
@ -219,7 +219,6 @@ class DiscordOAuthManager:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
@api_backoff
|
@api_backoff
|
||||||
def update_nickname(user_id, nickname):
|
def update_nickname(user_id, nickname):
|
||||||
try:
|
|
||||||
nickname = DiscordOAuthManager._sanitize_name(nickname)
|
nickname = DiscordOAuthManager._sanitize_name(nickname)
|
||||||
custom_headers = {'content-type': 'application/json', 'authorization': 'Bot ' + settings.DISCORD_BOT_TOKEN}
|
custom_headers = {'content-type': 'application/json', 'authorization': 'Bot ' + settings.DISCORD_BOT_TOKEN}
|
||||||
data = {'nick': nickname}
|
data = {'nick': nickname}
|
||||||
@ -232,9 +231,6 @@ class DiscordOAuthManager:
|
|||||||
return True
|
return True
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
return True
|
return True
|
||||||
except:
|
|
||||||
logger.exception("Failed to set nickname for Discord user ID %s (%s)" % (user_id, nickname))
|
|
||||||
return False
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def delete_user(user_id):
|
def delete_user(user_id):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user