Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.scanner.doStop()
else:
mac = self.proxi.dev_mac
if self.pauseMode:
mac = self.lastMAC
was_paused = True
else:
self.pausePressed(None)
was_paused = False
self.wTree.get_widget("labelBtnScanChannel").set_label(_("Stop sca_nning"))
self.wTree.get_widget("channelScanWindow").show_all()
self.scanningChannels = True
dialog = gtk.MessageDialog(message_format=_("The scanning process tries to connect to each of the 30 possible ports. This will take some time and you should watch your bluetooth device for any actions to be taken. If possible click on accept/connect. If you are asked for a pin your device was not paired properly before, see the manual on how to fix this."),buttons=gtk.BUTTONS_OK)
dialog.connect("response", lambda x,y: dialog.destroy())
dialog.run()
self.scanner = ScanDevice(mac,self.modelScan,was_paused,self.btnScanChannel_done)
return 0