mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
better naming
This commit is contained in:
@@ -27,7 +27,7 @@ class RpcShutdownError(JsonRpcError):
|
|||||||
class RpcMethod:
|
class RpcMethod:
|
||||||
"""RPC method."""
|
"""RPC method."""
|
||||||
|
|
||||||
def __init__(self, rpc: "Rpc", name: str):
|
def __init__(self, rpc: "BaseRpc", name: str):
|
||||||
self.rpc = rpc
|
self.rpc = rpc
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@ class BaseRpc:
|
|||||||
return RpcMethod(self, attr)
|
return RpcMethod(self, attr)
|
||||||
|
|
||||||
|
|
||||||
class Rpc(BaseRpc):
|
class RpcSubprocess(BaseRpc):
|
||||||
"""RPC client that runs and connects to a deltachat-rpc-server in a subprocess."""
|
"""RPC client that runs and connects to a deltachat-rpc-server in a subprocess."""
|
||||||
|
|
||||||
def __init__(self, accounts_dir: Optional[str] = None, rpc_server_path: Optional[str] = "deltachat-rpc-server"):
|
def __init__(self, accounts_dir: Optional[str] = None, rpc_server_path: Optional[str] = "deltachat-rpc-server"):
|
||||||
@@ -189,7 +189,7 @@ class Rpc(BaseRpc):
|
|||||||
|
|
||||||
The given arguments will be passed to subprocess.Popen().
|
The given arguments will be passed to subprocess.Popen().
|
||||||
"""
|
"""
|
||||||
super(Rpc, self).__init__()
|
super(RpcSubprocess, self).__init__()
|
||||||
self._accounts_dir = accounts_dir
|
self._accounts_dir = accounts_dir
|
||||||
self.rpc_server_path: str = rpc_server_path
|
self.rpc_server_path: str = rpc_server_path
|
||||||
|
|
||||||
@@ -214,6 +214,10 @@ class Rpc(BaseRpc):
|
|||||||
self.server_stdin.close()
|
self.server_stdin.close()
|
||||||
|
|
||||||
|
|
||||||
|
# backward compatibility
|
||||||
|
Rpc = RpcSubprocess
|
||||||
|
|
||||||
|
|
||||||
class RpcFIFO(BaseRpc):
|
class RpcFIFO(BaseRpc):
|
||||||
"""RPC client that runs and connects to a deltachat-rpc-server through FIFO files."""
|
"""RPC client that runs and connects to a deltachat-rpc-server through FIFO files."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user