From 363c8dfdb14c9b1f432b69d1600a74bd10d8e707 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 3 Oct 2023 13:36:22 -0400 Subject: [PATCH] Default spec registrar set as empty addr list Since it probably IS sane to just assume a root-actor-as-registrar listening on the localhost as a default, AND allows NOT expecting every caller of `open_piker_runtime()` to not have to pass an addr set XD This makes a bucha CLI shit work again after breakage due to no default.. --- piker/service/_actor_runtime.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/piker/service/_actor_runtime.py b/piker/service/_actor_runtime.py index 3fcfbb01..c8f7f5a5 100644 --- a/piker/service/_actor_runtime.py +++ b/piker/service/_actor_runtime.py @@ -56,7 +56,7 @@ def get_runtime_vars() -> dict[str, Any]: @acm async def open_piker_runtime( name: str, - registry_addrs: list[tuple[str, int]], + registry_addrs: list[tuple[str, int]] = [], enable_modules: list[str] = [], loglevel: Optional[str] = None, @@ -93,6 +93,8 @@ async def open_piker_runtime( 'piker_vars' ] = tractor_runtime_overrides + # NOTE: if no registrar list passed used the default of just + # setting it as the root actor on localhost. registry_addrs = ( registry_addrs or [_default_reg_addr]