summaryrefslogtreecommitdiff
path: root/oauthlib/oauth2/rfc6749/errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'oauthlib/oauth2/rfc6749/errors.py')
-rw-r--r--oauthlib/oauth2/rfc6749/errors.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/oauthlib/oauth2/rfc6749/errors.py b/oauthlib/oauth2/rfc6749/errors.py
index d2a1402..9896303 100644
--- a/oauthlib/oauth2/rfc6749/errors.py
+++ b/oauthlib/oauth2/rfc6749/errors.py
@@ -6,8 +6,6 @@ oauthlib.oauth2.rfc6749.errors
Error used both by OAuth 2 clients and providers to represent the spec
defined error responses for all four core grant types.
"""
-from __future__ import unicode_literals
-
import json
from oauthlib.common import add_params_to_uri, urlencode
@@ -45,10 +43,10 @@ class OAuth2Error(Exception):
if description is not None:
self.description = description
- message = '(%s) %s' % (self.error, self.description)
+ message = '({}) {}'.format(self.error, self.description)
if request:
message += ' ' + repr(request)
- super(OAuth2Error, self).__init__(message)
+ super().__init__(message)
self.uri = uri
self.state = state
@@ -389,7 +387,7 @@ class CustomOAuth2Error(OAuth2Error):
"""
def __init__(self, error, *args, **kwargs):
self.error = error
- super(CustomOAuth2Error, self).__init__(*args, **kwargs)
+ super().__init__(*args, **kwargs)
def raise_from_error(error, params=None):