Fix retry logic being suppressed by try block (#1035)

This commit is contained in:
randomic 2018-04-24 16:53:13 +01:00 committed by Adarnof
parent 37bed989f1
commit b4d33e5dfc

View File

@ -219,7 +219,6 @@ class DiscordOAuthManager:
@staticmethod
@api_backoff
def update_nickname(user_id, nickname):
try:
nickname = DiscordOAuthManager._sanitize_name(nickname)
custom_headers = {'content-type': 'application/json', 'authorization': 'Bot ' + settings.DISCORD_BOT_TOKEN}
data = {'nick': nickname}
@ -232,9 +231,6 @@ class DiscordOAuthManager:
return True
r.raise_for_status()
return True
except:
logger.exception("Failed to set nickname for Discord user ID %s (%s)" % (user_id, nickname))
return False
@staticmethod
def delete_user(user_id):