def check_hints(self, reply):
try:<EOL><INDENT>f_ind = reply.index("<STR_LIT>")<EOL>l_ind = reply.rindex("<STR_LIT>")<EOL><DEDENT>except Exception:<EOL><INDENT>fail_reason = vdp_const.hints_failure_reason % (reply)<EOL>LOG.error("<STR_LIT:%s>", fail_reason)<EOL>return False, fail_reason<EOL><DEDENT>if f_ind != l_ind:<EOL><INDENT>fail_reason = vdp_const.multiple_hints_failure_reason % (reply)<EOL>LOG.error("<STR_LIT:%s>", fail_reason)<EOL>return False, fail_reason<EOL><DEDENT>try:<EOL><INDENT>hints_compl = reply.partition("<STR_LIT>")[<NUM_LIT:2>]<EOL>hints_val = reply.partition("<STR_LIT>")[<NUM_LIT:2>][<NUM_LIT:0>:<NUM_LIT:4>]<EOL>len_hints = int(hints_val)<EOL>hints_val = hints_compl[<NUM_LIT:4>:<NUM_LIT:4> + len_hints]<EOL>hints = int(hints_val)<EOL>if hints != <NUM_LIT:0>:<EOL><INDENT>fail_reason = vdp_const.nonzero_hints_failure % (hints)<EOL>return False, fail_reason<EOL><DEDENT><DEDENT>except ValueError:<EOL><INDENT>fail_reason = vdp_const.format_failure_reason % (reply)<EOL>LOG.error("<STR_LIT:%s>", fail_reason)<EOL>return False, fail_reason<EOL><DEDENT>return True, None<EOL>
Parse the hints to check for errors.