def _set_creds(self, creds):
        if creds:
            creds = [self.wrap_credential(c) for c in creds]
            if self._creds and names(creds) == names(self._creds):
                entry_map = dict((c.cred.name, c) for c in creds)
                for entry in self._creds:
                    cred = entry.cred
                    code = entry_map[cred.name].code
                    if code.code:
                        entry.code = code
                    elif cred.oath_type != entry_map[cred.name].cred.oath_type:
                        break
                else:
                    return
            elif self._reader and self._needs_read and self._creds:
                return
        self._creds = creds
        self.refreshed.emit()