Fixed name clash
This commit is contained in:
parent
4462f9590f
commit
cfe78dfa23
1 changed files with 3 additions and 3 deletions
|
@ -15,10 +15,10 @@ class SerialPlugin(Plugin):
|
|||
|
||||
|
||||
def get_data(self):
|
||||
serial = serial.Serial(self.device, self.baud_rate)
|
||||
ser = serial.Serial(self.device, self.baud_rate)
|
||||
|
||||
try: data = serial.readline().decode('utf-8').strip()
|
||||
finally: serial.close()
|
||||
try: data = ser.readline().decode('utf-8').strip()
|
||||
finally: ser.close()
|
||||
|
||||
try: data = json.loads(data)
|
||||
except: pass
|
||||
|
|
Loading…
Reference in a new issue