From d91e5d4d5d0165a7f7599c84c988b981b5fd0d2d Mon Sep 17 00:00:00 2001 From: Steve Piercy <web@stevepiercy.com> Date: Thu, 13 Jul 2017 03:08:05 +0200 Subject: [PATCH] update doxs to use a Configurator context manager --- docs/quick_tour/hello_world/app.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/quick_tour/hello_world/app.py b/docs/quick_tour/hello_world/app.py index 75d22ac..dc6f323 100644 --- a/docs/quick_tour/hello_world/app.py +++ b/docs/quick_tour/hello_world/app.py @@ -8,9 +8,9 @@ if __name__ == '__main__': - config = Configurator() - config.add_route('hello', '/') - config.add_view(hello_world, route_name='hello') - app = config.make_wsgi_app() + with Configurator() as config: + config.add_route('hello', '/') + config.add_view(hello_world, route_name='hello') + app = config.make_wsgi_app() server = make_server('0.0.0.0', 6543, app) server.serve_forever() -- Gitblit v1.9.3