Skip to content

Commit

Permalink
Fix parsing of BitRate when there's no space separator in the string.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjwbbc committed Jan 19, 2024
1 parent 1fefe79 commit 82cd065
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/python3/lib/rt_m1_client/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 82cd065

Please sign in to comment.