Added try-except around get_baud()

This commit is contained in:
Patrick Goebel 2016-07-14 06:27:17 -07:00
parent 9231e6c8bd
commit dc6873ee08

View File

@ -258,7 +258,10 @@ class Arduino:
def get_baud(self): def get_baud(self):
''' Get the current baud rate on the serial port. ''' Get the current baud rate on the serial port.
''' '''
return int(self.execute('b')); try:
return int(self.execute('b'));
except:
return None
def get_encoder_counts(self): def get_encoder_counts(self):
values = self.execute_array('e') values = self.execute_array('e')