| 965 | return problem_info |
| 966 | |
| 967 | def _patch_offset(self): |
| 968 | # XXX: This is a temporary fix, until SAPI starts returning the offset |
| 969 | # in answer (for structured solvers only). |
| 970 | # It will patch `self._message` to include the offset as set in |
| 971 | # `self._offset`, but only if SAPI answer does not contain offset already. |
| 972 | msg = self._message |
| 973 | fmt = msg.get('answer', {}).get('format') |
| 974 | if fmt == 'qp': |
| 975 | if 'offset' not in msg['answer']: |
| 976 | msg['answer']['offset'] = self._offset |
| 977 | |
| 978 | def _decode(self): |
| 979 | """Decode answer data from the response.""" |