Commit 622a60ea authored by Antoine Millet's avatar Antoine Millet
Browse files

Connection attribute on RpcProxy is now public, and can be accessed with obj.connection.

parent 24b7b8a4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -23,12 +23,12 @@ class ConnectionProxy(object):
    '''
    
    def __init__(self, connection):
        self._connection = connection
        self.connection = connection

    def __getattr__(self, name):
        def func(*args, **kwargs):
            try:
                returned = self._connection.call(name, *args, **kwargs)
                returned = self.connection.call(name, *args, **kwargs)
            except RpcError as err:
                expt = __builtins__.get(err.exception)
                if expt is not None: