(self, cmd, res, **kwargs)
| 171 | ) |
| 172 | |
| 173 | def _parse_results(self, cmd, res, **kwargs): |
| 174 | if cmd in self._QUERY_REQUIRED_CMDS and "query" not in kwargs: |
| 175 | return res |
| 176 | protocol = get_protocol_version(self.client) |
| 177 | legacy = get_legacy_responses(self.client) |
| 178 | if legacy: |
| 179 | if protocol in (3, "3"): |
| 180 | if cmd == PROFILE_CMD: |
| 181 | return ProfileInformation(res) |
| 182 | cb = self._RESP3_MODULE_CALLBACKS.get(cmd) |
| 183 | elif check_protocol_version(protocol, 3): |
| 184 | cb = self._RESP3_TO_RESP2_LEGACY_MODULE_CALLBACKS.get(cmd) |
| 185 | else: |
| 186 | cb = self._RESP2_MODULE_CALLBACKS.get(cmd) |
| 187 | else: |
| 188 | if check_protocol_version(protocol, 3): |
| 189 | cb = self._RESP3_UNIFIED_MODULE_CALLBACKS.get(cmd) |
| 190 | else: |
| 191 | cb = self._RESP2_UNIFIED_MODULE_CALLBACKS.get(cmd) |
| 192 | if cb is None: |
| 193 | return res |
| 194 | return cb(res, **kwargs) |
| 195 | |
| 196 | @staticmethod |
| 197 | def _resp3_get(mapping, key, default=None): |
no test coverage detected