Handle if message is a non-string
This commit is contained in:
parent
3b62d883f4
commit
374754c9c9
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ DEFAULT_MESSAGE[403] = 'Permission Denied'
|
|||
DEFAULT_MESSAGE[404] = 'Not Found'
|
||||
|
||||
def abort(status_code, message=None, **kwargs):
|
||||
message = message % kwargs if message else DEFAULT_MESSAGE[status_code]
|
||||
message = str(message) % kwargs if message else DEFAULT_MESSAGE[status_code]
|
||||
|
||||
if status_code == 403:
|
||||
# Add the user information.
|
||||
|
|
Reference in a new issue