def _get_dev_from_reader(self): readers = list(open_ccid(self._reader_filter)) if len(readers) == 1: drv = readers[0] return YubiKey(Descriptor.from_driver(drv), drv) return None
def _readers_changed(self, filter): old_readers = self._readers self._readers = list(open_ccid(filter)) readers_changed = len(self._readers) != len(old_readers) return readers_changed