[gnome-keysign: 25/65] offer: avoid extra semicolon when bluetooth isn't available



commit 16b9cc802a14656dbc7fc239229c7b4e4e912cf7
Author: RyuzakiKK <aasonykk gmail com>
Date:   Sun Aug 20 16:09:22 2017 +0200

    offer: avoid extra semicolon when bluetooth isn't available

 keysign/offer.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/keysign/offer.py b/keysign/offer.py
index 50ea4d1..e2cbb00 100644
--- a/keysign/offer.py
+++ b/keysign/offer.py
@@ -17,13 +17,16 @@ class Offer:
         self.b_data = ""
 
     def allocate_code(self):
+        discovery_list = []
         self.a_offer = AvahiHTTPOffer(self.key)
         a_info = self.a_offer.start()
         code, a_data = a_info
+        discovery_list.append(a_data)
         if BluetoothOffer:
             self.bt_offer = BluetoothOffer(self.key)
             _, self.b_data = self.bt_offer.allocate_code()
-        discovery_data = a_data + ";" + self.b_data
+            discovery_list.append(self.b_data)
+        discovery_data = ";".join(discovery_list)
         return code, discovery_data
 
     def start(self):


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