From 82cd065914e966b569a76c0026d018891d1c7ecc Mon Sep 17 00:00:00 2001 From: David Waring Date: Fri, 19 Jan 2024 17:38:33 +0000 Subject: [PATCH] Fix parsing of BitRate when there's no space separator in the string. --- tools/python3/lib/rt_m1_client/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python3/lib/rt_m1_client/types.py b/tools/python3/lib/rt_m1_client/types.py index 87794b5..5f9f917 100644 --- a/tools/python3/lib/rt_m1_client/types.py +++ b/tools/python3/lib/rt_m1_client/types.py @@ -566,7 +566,7 @@ def __ne__(self, other: Union[int,float,"BitRate"]) -> bool: @staticmethod def __parseBitrateString(br: str) -> float: - val,units = br.split(' ',1) + val,units = (br.split(' ',1) + [None])[:2] val = float(val) if units not in ['bps', 'Kbps', 'Mbps', 'Gbps', 'Tbps', 'Pbps']: raise ValueError('BitRate string must have units of bps, Kbps, Mbps, Gbps, Tbps or Pbps')