From 044104a171e213bf6317f6627e816377e645c7d2 Mon Sep 17 00:00:00 2001 From: thec0sm0s Date: Sun, 10 May 2020 17:52:07 +0530 Subject: [PATCH] One Liner style? --- flask_discord/_http.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/flask_discord/_http.py b/flask_discord/_http.py index 29ed6de..98f9108 100644 --- a/flask_discord/_http.py +++ b/flask_discord/_http.py @@ -107,10 +107,8 @@ class DiscordOAuth2HttpClient(abc.ABC): """ route = configs.DISCORD_API_BASE_URL + route - if oauth: - response = self._make_session().request(method, route, data, **kwargs) - else: - response = requests.request(method, route, data=data, **kwargs) + response = self._make_session( + ).request(method, route, data, **kwargs) if oauth else requests.request(method, route, data=data, **kwargs) if response.status_code == 401: raise exceptions.Unauthorized