@QtCore.Slot(YubiKeyNeo)
    def set_neo(self, neo):
        self._neo = neo
        if not neo or not neo.has_ccid:
            self.parent.setTabEnabled(self.index, False)
            self.parent.setTabToolTip(self.index, m.requires_ccid)
            return

        self.parent.setTabEnabled(self.index, True)
        self.parent.setTabToolTip(self.index, None)

        if neo.locked:
            try:
                neo.unlock()
            except:
                return

        appletmanager = QtCore.QCoreApplication.instance().appletmanager
        self._apps = filter(None, map(appletmanager.get_applet,
                                      neo.list_apps()))
        self._apps_list.model().setStringList(
            map(lambda app: "%s (%s)" % (app.name, app.aid), self._apps))
dataset/ETHPy150Open Yubico/yubikey-neo-manager/neoman/view/neo.py/AppsTab.set_neo/original