mirror of
https://github.com/spl0k/supysonic.git
synced 2024-12-22 17:06:17 +00:00
Fix for werkzeug 0.15
This commit is contained in:
parent
10df0ada07
commit
ebea356901
@ -3,7 +3,7 @@
|
|||||||
# This file is part of Supysonic.
|
# This file is part of Supysonic.
|
||||||
# Supysonic is a Python implementation of the Subsonic server API.
|
# Supysonic is a Python implementation of the Subsonic server API.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2018 Alban 'spl0k' Féron
|
# Copyright (C) 2018-2019 Alban 'spl0k' Féron
|
||||||
#
|
#
|
||||||
# Distributed under terms of the GNU AGPLv3 license.
|
# Distributed under terms of the GNU AGPLv3 license.
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ def value_error(e):
|
|||||||
@api.errorhandler(BadRequestKeyError)
|
@api.errorhandler(BadRequestKeyError)
|
||||||
def key_error(e):
|
def key_error(e):
|
||||||
rollback()
|
rollback()
|
||||||
return MissingParameter(e.args[0])
|
return MissingParameter()
|
||||||
|
|
||||||
@api.errorhandler(ObjectNotFound)
|
@api.errorhandler(ObjectNotFound)
|
||||||
def not_found(e):
|
def not_found(e):
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# This file is part of Supysonic.
|
# This file is part of Supysonic.
|
||||||
# Supysonic is a Python implementation of the Subsonic server API.
|
# Supysonic is a Python implementation of the Subsonic server API.
|
||||||
#
|
#
|
||||||
# Copyright (C) 2018 Alban 'spl0k' Féron
|
# Copyright (C) 2018-2019 Alban 'spl0k' Féron
|
||||||
#
|
#
|
||||||
# Distributed under terms of the GNU AGPLv3 license.
|
# Distributed under terms of the GNU AGPLv3 license.
|
||||||
|
|
||||||
@ -42,9 +42,9 @@ class UnsupportedParameter(GenericError):
|
|||||||
class MissingParameter(SubsonicAPIException):
|
class MissingParameter(SubsonicAPIException):
|
||||||
api_code = 10
|
api_code = 10
|
||||||
|
|
||||||
def __init__(self, param, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(MissingParameter, self).__init__(*args, **kwargs)
|
super(MissingParameter, self).__init__(*args, **kwargs)
|
||||||
self.message = "Required parameter '{}' is missing.".format(param)
|
self.message = "A required parameter is missing."
|
||||||
|
|
||||||
class ClientMustUpgrade(SubsonicAPIException):
|
class ClientMustUpgrade(SubsonicAPIException):
|
||||||
api_code = 20
|
api_code = 20
|
||||||
|
Loading…
Reference in New Issue
Block a user