Remove start_rpc_server() and make Rpc a context manager

Rpc now has a start() method.
This way it is possible to use Rpc from IPython without calling __aenter__()
This commit is contained in:
link2xt
2022-12-04 00:02:32 +00:00
parent 5a3065344e
commit 2ccf39800d
5 changed files with 38 additions and 36 deletions

View File

@@ -7,7 +7,7 @@ import deltachat_rpc_client as dc
async def main():
async with dc.start_rpc_server() as rpc:
async with dc.Rpc() as rpc:
deltachat = dc.Deltachat(rpc)
system_info = await deltachat.get_system_info()
logging.info("Running deltachat core %s", system_info["deltachat_core_version"])