Added output format parameter TODO.

This commit is contained in:
Nick Daly 2012-05-23 21:39:25 -05:00
parent b7c89ed1b3
commit ecf3dfcc5d

View File

@ -80,8 +80,11 @@ class Listener(SantiagoListener):
@cherrypy.expose @cherrypy.expose
@cherrypy.tools.json_out() @cherrypy.tools.json_out()
def where(self, host, service): def where(self, host, service):
"""Show where a host is providing me services.""" """Show where a host is providing me services.
TODO: make the output format a parameter.
"""
if not cherrypy.request.remote.ip.startswith("127.0.0."): if not cherrypy.request.remote.ip.startswith("127.0.0."):
logging.debug("protocols.https.query: Request from non-local IP") logging.debug("protocols.https.query: Request from non-local IP")
return return
@ -101,13 +104,13 @@ class Listener(SantiagoListener):
@cherrypy.expose @cherrypy.expose
def pdb(self): def pdb(self):
"""Set a trace.""" """Set a trace."""
if not cherrypy.request.remote.ip.startswith("127.0.0."): if not cherrypy.request.remote.ip.startswith("127.0.0."):
logging.debug("protocols.https.query: Request from non-local IP") logging.debug("protocols.https.query: Request from non-local IP")
return return
import pdb; pdb.set_trace() import pdb; pdb.set_trace()
class Sender(SantiagoSender): class Sender(SantiagoSender):
def __init__(self, santiago, proxy_host, proxy_port): def __init__(self, santiago, proxy_host, proxy_port):