def parse_params_target(params):
""" Get the `target` from request params or raise http 400 error. """
try:
return params.pop('target')
except KeyError:
raise cherrypy.HTTPError(status.BAD_REQUEST, ERR_NO_TARGET)
文章目录