From 6c1a6a589a99da15ab936bf11cf3640ba9b24182 Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Fri, 12 Jun 2015 14:10:00 +0200 Subject: Refactor. --- BluetoothPairedDevices.py | 2 +- ParrotZik.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BluetoothPairedDevices.py b/BluetoothPairedDevices.py index 4cf0c2b..4190159 100644 --- a/BluetoothPairedDevices.py +++ b/BluetoothPairedDevices.py @@ -24,7 +24,7 @@ def ParrotZikMac(): for mac in parsed_plist['PairedDevices']: if p.match(mac.replace("-", ":")): return mac.replace("-", ":") - except: + except Exception: pass elif sys.platform == "win32": diff --git a/ParrotZik.py b/ParrotZik.py index a934a90..be84411 100644 --- a/ParrotZik.py +++ b/ParrotZik.py @@ -62,12 +62,12 @@ class ParrotZik(object): self.BatteryCharging = True else: self.BatteryCharging = False - except: + except Exception: pass try: print "notification received" + data.notify["path"] - except: + except Exception: pass return self.BatteryLevel @@ -129,7 +129,7 @@ class ParrotZik(object): def sendMessage(self, message): try: self.sock.send(str(message)) - except: + except Exception: self.sock = "" return if sys.platform == "darwin": -- cgit v1.2.1