def parse_xmlsec_output(output):
 for line in output.split('\n'):
  if (line == 'OK'):
   return True
  elif (line == 'FAIL'):
   raise XmlsecError(output)
 raise XmlsecError(output)

def parse_xmlsec_output ( output ) : for line in output . split ( '\n' ) : if ( line == 'OK' ) : return True elif ( line == 'FAIL' ) : raise XmlsecError ( output ) raise XmlsecError ( output )
parse the output from xmlsec to try to find out if the command was successfull or not .