def params_check_target(): """ Check the request params contains 'target' or not. """ if not cherrypy.request.params.has_key('target'): raise cherrypy.HTTPError(status.BAD_REQUEST, ERR_NO_TARGET)