mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
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:
@@ -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"])
|
||||
|
||||
Reference in New Issue
Block a user