##// END OF EJS Templates
hgweb: consume generator inside context manager (issue4756)...
Gregory Szorc -
r26247:7df5d476 default
parent child Browse files
Show More
@@ -275,7 +275,8 b' class hgweb(object):'
275 should be using instances of this class as the WSGI application.
275 should be using instances of this class as the WSGI application.
276 """
276 """
277 with self._obtainrepo() as repo:
277 with self._obtainrepo() as repo:
278 return self._runwsgi(req, repo)
278 for r in self._runwsgi(req, repo):
279 yield r
279
280
280 def _runwsgi(self, req, repo):
281 def _runwsgi(self, req, repo):
281 rctx = requestcontext(self, repo)
282 rctx = requestcontext(self, repo)
@@ -58,7 +58,8 b' by the WSGI standard and strictly implem'
58 > }
58 > }
59 >
59 >
60 > i = hgweb('.')
60 > i = hgweb('.')
61 > i(env, startrsp)
61 > for c in i(env, startrsp):
62 > pass
62 > print '---- ERRORS'
63 > print '---- ERRORS'
63 > print errors.getvalue()
64 > print errors.getvalue()
64 > print '---- OS.ENVIRON wsgi variables'
65 > print '---- OS.ENVIRON wsgi variables'
General Comments 0
You need to be logged in to leave comments. Login now