From 77eca33f2695eea690dff7999c0e1bd3df0e1733 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 29 Apr 2012 10:56:33 +1200 Subject: 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. --- pathod | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'pathod') 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 - -- cgit v1.2.3