We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9eeba4f commit e6f6b55Copy full SHA for e6f6b55
can/util.py
@@ -215,12 +215,12 @@ def _create_bus_config(config: Dict[str, Any]) -> typechecking.BusConfig:
215
if isinstance(config["port"], str):
216
if config["port"].isnumeric():
217
config["port"] = int(config["port"])
218
- if not 0 < config["port"] < 65535:
219
- raise ValueError("Port config must be inside 0-65535 range!")
220
else:
221
raise ValueError("Port config must be a number!")
222
elif not isinstance(config["port"], int):
223
raise TypeError("Port config must be string or integer!")
+ if not 0 < config["port"] < 65535:
+ raise ValueError("Port config must be inside 0-65535 range!")
224
if "bitrate" in config:
225
config["bitrate"] = int(config["bitrate"])
226
if "fd" in config:
0 commit comments