Revision c2dc025a lib/rpc.py
b/lib/rpc.py | ||
---|---|---|
710 | 710 |
"""RPC wrappers for L{config}. |
711 | 711 |
|
712 | 712 |
""" |
713 |
def __init__(self, context, address_list): |
|
713 |
def __init__(self, context, address_list, _req_process_fn=None, |
|
714 |
_getents=None): |
|
714 | 715 |
"""Initializes this class. |
715 | 716 |
|
716 | 717 |
""" |
... | ... | |
725 | 726 |
# Caller provided an address list |
726 | 727 |
resolver = _StaticResolver(address_list) |
727 | 728 |
|
728 |
_RpcClientBase.__init__(self, resolver, _ENCODERS.get, |
|
729 |
lock_monitor_cb=lock_monitor_cb) |
|
729 |
encoders = _ENCODERS.copy() |
|
730 |
|
|
731 |
encoders.update({ |
|
732 |
rpc_defs.ED_FILE_DETAILS: compat.partial(_PrepareFileUpload, _getents), |
|
733 |
}) |
|
734 |
|
|
735 |
_RpcClientBase.__init__(self, resolver, encoders.get, |
|
736 |
lock_monitor_cb=lock_monitor_cb, |
|
737 |
_req_process_fn=_req_process_fn) |
|
730 | 738 |
_generated_rpc.RpcClientConfig.__init__(self) |
Also available in: Unified diff