[gnome-keysign: 36/65] send: avoid appending empty element when bt is not available



commit 09a162b3ef1a2729653b37e4f6506791aba95226
Author: RyuzakiKK <aasonykk gmail com>
Date:   Sun Aug 20 21:17:41 2017 +0200

    send: avoid appending empty element when bt is not available

 keysign/send.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/keysign/send.py b/keysign/send.py
index 9f413c1..771845b 100755
--- a/keysign/send.py
+++ b/keysign/send.py
@@ -99,7 +99,8 @@ class SendApp:
         if BluetoothOffer:
             self.bt_offer = BluetoothOffer(self.key)
             _, bt_data = self.bt_offer.allocate_code()
-            discovery_list.append(bt_data)
+            if bt_data:
+                discovery_list.append(bt_data)
         discovery_data = ";".join(discovery_list)
         if bt_data:
             # We ignore the result of the defer because we don't have


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]