command:serve: wrap server in ExceptionApp regardless of SSL.
authorW. Trevor King <wking@tremily.us>
Fri, 24 Aug 2012 13:33:14 +0000 (09:33 -0400)
committerW. Trevor King <wking@tremily.us>
Fri, 24 Aug 2012 13:33:14 +0000 (09:33 -0400)
Previously, only the SSL server was using ExceptionApp.

libbe/command/serve.py

index 3bfac0cfd6cad048a30e42021d39c8844ff0b5c6..1206ebd578e83756fe3a1035e1d2d88a772311bf 100644 (file)
@@ -829,12 +829,12 @@ class Serve (libbe.command.Command):
 
     def _get_server(self, params, app):
         details = {'port':params['port']}
+        app = ExceptionApp(app, logger=self.logger)
         if params['ssl'] == True:
             details['protocol'] = 'HTTPS'
             if cherrypy == None:
                 raise libbe.command.UserError, \
                     '--ssl requires the cherrypy module'
-            app = ExceptionApp(app, logger=self.logger)
             server = cherrypy.wsgiserver.CherryPyWSGIServer(
                 (params['host'], params['port']), app)
             #server.throw_errors = True