Skip to content
Snippets Groups Projects
Commit 3cde7284 authored by Antoine Millet's avatar Antoine Millet
Browse files

Whitespaces.

parent 4eadc7b5
No related branches found
No related tags found
No related merge requests found
...@@ -6,17 +6,17 @@ from sjrpc.core.exceptions import RpcError ...@@ -6,17 +6,17 @@ from sjrpc.core.exceptions import RpcError
class ConnectionProxy(object): class ConnectionProxy(object):
''' '''
Create a new call proxy for the connection passed in arguments. Create a new call proxy for the connection passed in arguments.
Usage example: Usage example:
>>> proxy = ConnectionProxy(conn) >>> proxy = ConnectionProxy(conn)
>>> ret = proxy.existing_function() >>> ret = proxy.existing_function()
If exception is raised by the function, the proxy tries to get the If exception is raised by the function, the proxy tries to get the
exception class in *__builtins__* to re-raise it. If exception class exception class in *__builtins__* to re-raise it. If exception class
is not found in *__builtins__*, the exception raised is the is not found in *__builtins__*, the exception raised is the
original :exc:`RpcError`: original :exc:`RpcError`:
>>> proxy.unknown_function() >>> proxy.unknown_function()
[Traceback] [Traceback]
NameError: remote name 'unknown_function' is not defined NameError: remote name 'unknown_function' is not defined
...@@ -24,7 +24,7 @@ class ConnectionProxy(object): ...@@ -24,7 +24,7 @@ class ConnectionProxy(object):
>>> proxy['myfunc']() # You can also use this syntax >>> proxy['myfunc']() # You can also use this syntax
... ...
''' '''
def __init__(self, connection): def __init__(self, connection):
self.connection = connection self.connection = connection
...@@ -40,7 +40,7 @@ class ConnectionProxy(object): ...@@ -40,7 +40,7 @@ class ConnectionProxy(object):
raise err raise err
else: else:
return returned return returned
return func return func
def __getitem__(self, name): def __getitem__(self, name):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment