forked from platypush/platypush
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):
|
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()
|
try: data = ser.readline().decode('utf-8').strip()
|
||||||
finally: serial.close()
|
finally: ser.close()
|
||||||
|
|
||||||
try: data = json.loads(data)
|
try: data = json.loads(data)
|
||||||
except: pass
|
except: pass
|
||||||
|
|
Loading…
Reference in a new issue