From d76b5f827398520d2d80a96eb38cfb26baaf4188 Mon Sep 17 00:00:00 2001
From: Michael Merickel <michael@merickel.org>
Date: Thu, 13 Jul 2017 03:19:21 +0200
Subject: [PATCH] Merge pull request #3126 from mmerickel/backport-3119-to-1.9-branch

---
 docs/quick_tour/view_classes/app.py |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/docs/quick_tour/view_classes/app.py b/docs/quick_tour/view_classes/app.py
index 40faddd..a007dee 100644
--- a/docs/quick_tour/view_classes/app.py
+++ b/docs/quick_tour/view_classes/app.py
@@ -2,12 +2,12 @@
 from pyramid.config import Configurator
 
 if __name__ == '__main__':
-    config = Configurator()
-    config.add_route('hello', '/howdy/{name}')
-    config.add_route('hello_json', 'hello.json')
-    config.add_static_view(name='static', path='static')
-    config.include('pyramid_jinja2')
-    config.scan('views')
-    app = config.make_wsgi_app()
+    with Configurator() as config:
+        config.add_route('hello', '/howdy/{name}')
+        config.add_route('hello_json', 'hello.json')
+        config.add_static_view(name='static', path='static')
+        config.include('pyramid_jinja2')
+        config.scan('views')
+        app = config.make_wsgi_app()
     server = make_server('0.0.0.0', 6543, app)
     server.serve_forever()

--
Gitblit v1.9.3