mirror of
https://github.com/rightup/pyMC_Repeater.git
synced 2026-05-18 07:16:20 +02:00
Fix integer conversion by stripping trailing commas in get_radio_for_board function
This commit is contained in:
+1
-1
@@ -203,7 +203,7 @@ def get_radio_for_board(board_config: dict):
|
||||
if isinstance(value, int):
|
||||
return value
|
||||
if isinstance(value, str):
|
||||
return int(value.strip(), 0)
|
||||
return int(value.strip().rstrip(','), 0)
|
||||
raise ValueError(f"Invalid int value type: {type(value)}")
|
||||
|
||||
radio_type = board_config.get("radio_type", "sx1262").lower()
|
||||
|
||||
Reference in New Issue
Block a user