Skip to content

Commit 70ecdb5

Browse files
author
Brendan Whitfield
committed
return early if set_baudrate fails
1 parent 0c1f164 commit 70ecdb5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

obd/elm327.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ def __init__(self, portname, baudrate, protocol):
134134
# ------------------------ find the ELM's baud ------------------------
135135

136136
if not self.set_baudrate(baudrate):
137-
self.__error("Failed to set baudrate");
137+
self.__error("Failed to set baudrate")
138+
return
138139

139140
# ---------------------------- ATZ (reset) ----------------------------
140141
try:

0 commit comments

Comments
 (0)