diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-04-29 10:56:33 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-04-29 10:56:33 +1200 |
commit | 77eca33f2695eea690dff7999c0e1bd3df0e1733 (patch) | |
tree | d2ee69461276805bb2a5f295c18a5b7b4df2c973 /pathod | |
parent | ee909e265b40743479ca2f3e8b518f76c91f83f8 (diff) | |
download | mitmproxy-77eca33f2695eea690dff7999c0e1bd3df0e1733.tar.gz mitmproxy-77eca33f2695eea690dff7999c0e1bd3df0e1733.tar.bz2 mitmproxy-77eca33f2695eea690dff7999c0e1bd3df0e1733.zip |
Refactor application definitions and startup.
Also, create one of the dodgiest web testing trusses in history. Tornado just
seems to have no nice way of doing this.
Diffstat (limited to 'pathod')
-rwxr-xr-x | pathod | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,6 +1,6 @@ #!/usr/bin/env python import argparse -import libpathod +from libpathod import app import tornado.ioloop if __name__ == "__main__": @@ -12,10 +12,11 @@ if __name__ == "__main__": ) args = parser.parse_args() - libpathod.application(staticdir=args.staticdir).listen(args.port) + application = app.PathodApp( + staticdir=args.staticdir + ) print "pathod listening on port %s"%args.port try: - tornado.ioloop.IOLoop.instance().start() + app.run(application, args.port, None) except KeyboardInterrupt: pass - |