Skip to content

Commit 345022e

Browse files
committed
fix small bug
1 parent 9cf39db commit 345022e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

buildhat/serinterface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def runit():
271271
with self.portcond[portid]:
272272
self.portcond[portid].notify()
273273

274-
if line[1] == "." and line.strip().endswith(" V"):
274+
if len(line) >= 5 and line[1] == "." and line.strip().endswith(" V"):
275275
vin = float(line.strip().split(" ")[0])
276276
self.vin = vin
277277
with self.vincond:

0 commit comments

Comments
 (0)