def check_status(self):
status = OneLogin_Saml2_Utils.get_status(self.document)<EOL>code = status.get('<STR_LIT:code>', None)<EOL>if code and code != OneLogin_Saml2_Constants.STATUS_SUCCESS:<EOL><INDENT>splited_code = code.split('<STR_LIT::>')<EOL>printable_code = splited_code.pop()<EOL>status_exception_msg = '<STR_LIT>' % printable_code<EOL>status_msg = status.get('<STR_LIT>', None)<EOL>if status_msg:<EOL><INDENT>status_exception_msg += '<STR_LIT>' + status_msg<EOL><DEDENT>raise OneLogin_Saml2_ValidationError(<EOL>status_exception_msg,<EOL>OneLogin_Saml2_ValidationError.STATUS_CODE_IS_NOT_SUCCESS<EOL>)<EOL><DEDENT>
Check if the status of the response is success or not

:raises: Exception. If the status is not success