aboutsummaryrefslogtreecommitdiffstats
path: root/pathod
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2012-04-29 10:56:33 +1200
committerAldo Cortesi <aldo@nullcube.com>2012-04-29 10:56:33 +1200
commit77eca33f2695eea690dff7999c0e1bd3df0e1733 (patch)
treed2ee69461276805bb2a5f295c18a5b7b4df2c973 /pathod
parentee909e265b40743479ca2f3e8b518f76c91f83f8 (diff)
downloadmitmproxy-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-xpathod9
1 files changed, 5 insertions, 4 deletions
diff --git a/pathod b/pathod
index 4340e2d1..100a70a2 100755
--- a/pathod
+++ b/pathod
@@ -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
-