show deprecated warning

This commit is contained in:
Jack Robison 2017-08-15 11:17:50 -04:00
parent ac4d905a7e
commit 18f5f850cd
No known key found for this signature in database
GPG key ID: 284699E7404E3CFF

View file

@ -340,7 +340,6 @@ class AuthJSONRPCServer(AuthorizedBase):
)
return server.NOT_DONE_YET
except DeprecatedAPIMethodError:
log.warning('API function is deprecated %s', function_name)
self._render_error(
JSONRPCError(None, JSONRPCError.CODE_METHOD_NOT_FOUND),
request, id_
@ -475,6 +474,10 @@ class AuthJSONRPCServer(AuthorizedBase):
def _check_deprecated(self, function_path):
if function_path in self.deprecated_methods:
new_command = self.deprecated_methods[function_path]._new_command
log.warning('API function \"%s\" is deprecated, please update to use \"%s\"',
function_path, new_command)
raise DeprecatedAPIMethodError(function_path)
def _verify_method_is_callable(self, function_path):