From cfe78dfa23be9f90bfe2501970a50389f46ac73b Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 29 Apr 2018 16:19:26 +0200 Subject: [PATCH] Fixed name clash --- platypush/plugins/serial/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platypush/plugins/serial/__init__.py b/platypush/plugins/serial/__init__.py index 201e4009f8..a1c6190122 100644 --- a/platypush/plugins/serial/__init__.py +++ b/platypush/plugins/serial/__init__.py @@ -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