From c7b23ede91c27c9995473f10495fadb49c40e3ec Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Tue, 14 May 2024 15:45:29 +0200 Subject: [PATCH] Rename --- posttroll/subscriber.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/posttroll/subscriber.py b/posttroll/subscriber.py index 9a04008..c32ccbf 100644 --- a/posttroll/subscriber.py +++ b/posttroll/subscriber.py @@ -180,9 +180,9 @@ def __init__(self, services="", topics=_MAGICK, addr_listener=False, Default is to listen to all available services. """ - self._services = _to_array(services) - self._topics = _to_array(topics) - self._addresses = _to_array(addresses) + self._services = _to_list(services) + self._topics = _to_list(topics) + self._addresses = _to_list(addresses) self._timeout = timeout self._translate = translate @@ -283,7 +283,7 @@ def __exit__(self, exc_type, exc_val, exc_tb): return self.subscriber.stop() -def _to_array(obj): +def _to_list(obj): """Convert *obj* to list if not already one.""" if isinstance(obj, str): return [obj, ]