Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud committed May 14, 2024
1 parent 93c78e5 commit c7b23ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions posttroll/subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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, ]
Expand Down

0 comments on commit c7b23ed

Please sign in to comment.