diff talosnames/web.py @ 66:0f5c22c07146

add interface for paste since wsgiref falls over in production
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 20 Aug 2012 09:49:18 -0700
parents 08422429b181
children 6e495bad69bb
line wrap: on
line diff
--- a/talosnames/web.py	Thu Aug 16 16:54:36 2012 -0700
+++ b/talosnames/web.py	Mon Aug 20 09:49:18 2012 -0700
@@ -141,7 +141,14 @@
         template = self.paths.get(path, 'index.html')
         return os.path.join(here, 'templates', template)
 
+def paste_factory(global_conf, **app_conf):
+    """factory interface for paste"""
+    app = Handler(**app_conf)
+    return app
+
 def main(args=sys.argv[1:]):
+    """CLI entry point"""
+
     parser = optparse.OptionParser()
     parser.add_option('-o', '--output', dest='output',
                       help="file to output to")