def identify_dev_cb(model): self.device = device DeviceProfileCache.store(device) config.set_last_device(device.cached_id) hook_it_up(self.splash, DeviceListener(self.device), self.device)
def identify_dev_eb(failure): failure.trap(SerialException) from vmc.gtk import dialogs info = dict(name=device.name, vmc=APP_LONG_NAME) message = _('Device setup not completed') details = _(""" %(vmc)s cannot connect with the selected device (%(name)s). """) % info dialogs.open_warning_dialog(message, details) config.set_last_device('') self.detect_hardware()
def identify_dev_eb(failure): failure.trap(SerialException) from PyQt4.QtGui import QMessageBox info = dict(name=device.name, vmc=APP_LONG_NAME) message = _('Device setup not completed') details = _(""" %(vmc)s cannot connect with the selected device (%(name)s). """) % info QMessageBox.warning(None, message, details) config.set_last_device('') self.detect_hardware()
def configure_hardware(self, device): self.device = device config.set_last_device(device) hook_it_up(self.splash, self.device)