Raise instances of exceptions for consistency

This commit is contained in:
weibeu
2021-05-23 22:13:16 +05:30
parent f1f5681317
commit 4d2e0fe2ea
3 changed files with 5 additions and 5 deletions

View File

@@ -23,7 +23,7 @@ class JSONBool(object):
return cls(True)
if value.lower() == "false":
return cls(False)
raise ValueError
raise ValueError()
def json_bool(value):
@@ -45,7 +45,7 @@ def requires_authorization(view):
@functools.wraps(view)
def wrapper(*args, **kwargs):
if not current_app.discord.authorized:
raise exceptions.Unauthorized
raise exceptions.Unauthorized()
return view(*args, **kwargs)
return wrapper