Skip to content

Commit

Permalink
clean up BLE empty filter
Browse files Browse the repository at this point in the history
  • Loading branch information
bri3d committed May 20, 2022
1 parent d6b6b38 commit 161176b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions VW_Flash_GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,9 +719,9 @@ def on_stop_logger(self, event):
def ble_scan_callback(self, interfaces):
self.panel.interfaces += interfaces
dialog_interfaces = []
for i in range(len(self.panel.interfaces)):
if(self.panel.interfaces[i][0] is not None):
dialog_interfaces.append(self.panel.interfaces[i][0])
self.panel.interfaces = list(filter(lambda interface: interface[0] is not None, self.panel.interfaces))
for interface in self.panel.interfaces:
dialog_interfaces.append(interface[0])
dlg = wx.SingleChoiceDialog(
self, "Select an Interface", "Select an interface", dialog_interfaces
)
Expand Down

0 comments on commit 161176b

Please sign in to comment.