From 4a89509c71c2ae917b3b8518f5ca8d214b6c955b Mon Sep 17 00:00:00 2001 From: Sérgio M. Basto Date: Feb 05 2016 01:06:45 +0000 Subject: git add 84b83c64428f42e2e7a0069d2f3b30d532cd6267.patch --- diff --git a/84b83c64428f42e2e7a0069d2f3b30d532cd6267.patch b/84b83c64428f42e2e7a0069d2f3b30d532cd6267.patch new file mode 100644 index 0000000..1e704fa --- /dev/null +++ b/84b83c64428f42e2e7a0069d2f3b30d532cd6267.patch @@ -0,0 +1,33 @@ +From 84b83c64428f42e2e7a0069d2f3b30d532cd6267 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= +Date: Thu, 4 Feb 2016 11:04:17 +0100 +Subject: [PATCH] Properly handle errors from Bluetooth scanning +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes #21 + +Signed-off-by: Michal Čihař +--- + Wammu/SettingsStorage.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Wammu/SettingsStorage.py b/Wammu/SettingsStorage.py +index d2d8443..b2fa968 100644 +--- a/Wammu/SettingsStorage.py ++++ b/Wammu/SettingsStorage.py +@@ -242,10 +242,10 @@ def GetBluezDevices(self): + import bluetooth + return bluetooth.discover_devices() + except ImportError: ++ # Module does not exist + return [] +- except bluetooth.BluetoothError: +- return [] +- except IOError: ++ except (bluetooth.BluetoothError, IOError, OSError): ++ # Failed to scan + return [] + + def CheckDev(self, dev):