Show More
@@ -210,12 +210,10 b' class RequestScopeProxyFactory(object):' | |||
|
210 | 210 | request = request or get_current_request() |
|
211 | 211 | return self.getProxy(request) |
|
212 | 212 | |
|
213 |
def getProxy(self, request |
|
|
213 | def getProxy(self, request): | |
|
214 | 214 | """ |
|
215 | 215 | Call this to get the pyro proxy instance for the request. |
|
216 | 216 | """ |
|
217 | request = request or get_current_request() | |
|
218 | ||
|
219 | 217 | # Return already borrowed proxy for this request |
|
220 | 218 | if request in self._borrowed_proxies: |
|
221 | 219 | return self._borrowed_proxies[request] |
@@ -233,13 +231,11 b' class RequestScopeProxyFactory(object):' | |||
|
233 | 231 | |
|
234 | 232 | return proxy |
|
235 | 233 | |
|
236 |
def _returnProxy(self, request |
|
|
234 | def _returnProxy(self, request): | |
|
237 | 235 | """ |
|
238 | 236 | Callback that gets called by pyramid when the request is finished. |
|
239 | 237 | It puts the proxy back into the pool. |
|
240 | 238 | """ |
|
241 | request = request or get_current_request() | |
|
242 | ||
|
243 | 239 | if request in self._borrowed_proxies: |
|
244 | 240 | proxy = self._borrowed_proxies.pop(request) |
|
245 | 241 | self._proxy_pool.append(proxy) |
General Comments 0
You need to be logged in to leave comments.
Login now