From 8a01c9e42b751c481909f048323100ffd0b3f91e Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 10 Nov 2022 01:41:35 -0500 Subject: [PATCH] Fix broker-tail stripping using `str.removesuffix()` --- piker/data/feed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piker/data/feed.py b/piker/data/feed.py index 1a5eba0c..672974e6 100644 --- a/piker/data/feed.py +++ b/piker/data/feed.py @@ -1255,7 +1255,7 @@ async def open_feed_bus( assert bfqsn in fqsn and brokername in fqsn if sym.suffix: - bfqsn = fqsn.rstrip(f'.{brokername}') + bfqsn = fqsn.removesuffix(f'.{brokername}') log.warning(f'{brokername} expanded symbol {symbol} -> {bfqsn}') # pack for ``.started()`` sync msg @@ -1327,7 +1327,7 @@ async def open_feed_bus( # maybe use the current task-id to key the sub list that's # added / removed? Or maybe we can add a general # pause-resume by sub-key api? - bfqsn = fqsn.rstrip(f'.{brokername}') + bfqsn = fqsn.removesuffix(f'.{brokername}') bus_subs = bus._subscribers[bfqsn] bus_subs.append(sub) local_subs.append(sub)