# HG changeset patch # User Martin Bornhold # Date 2016-07-04 13:44:15 # Node ID e62de5c9fb853f5fe1af86b183e3900b55f822f7 # Parent 5b26b74b61f6c45965e1e9fbe88eaec9c667e4f3 pyro: Make request argument mandatory. diff --git a/rhodecode/lib/vcs/client.py b/rhodecode/lib/vcs/client.py --- a/rhodecode/lib/vcs/client.py +++ b/rhodecode/lib/vcs/client.py @@ -210,12 +210,10 @@ class RequestScopeProxyFactory(object): request = request or get_current_request() return self.getProxy(request) - def getProxy(self, request=None): + def getProxy(self, request): """ Call this to get the pyro proxy instance for the request. """ - request = request or get_current_request() - # Return already borrowed proxy for this request if request in self._borrowed_proxies: return self._borrowed_proxies[request] @@ -233,13 +231,11 @@ class RequestScopeProxyFactory(object): return proxy - def _returnProxy(self, request=None): + def _returnProxy(self, request): """ Callback that gets called by pyramid when the request is finished. It puts the proxy back into the pool. """ - request = request or get_current_request() - if request in self._borrowed_proxies: proxy = self._borrowed_proxies.pop(request) self._proxy_pool.append(proxy)