# HG changeset patch # User Goffi # Date 1546544961 -3600 # Node ID 1797671827b996b1c53ae4310e52f1a2e6460fa2 # Parent 8fd8ce5a58553345c045c05367335c29e6f297cc tools (xml_tools): isXMLUICancelled helper function to check if an XMLUI has been cancelled from raw XML. diff -r 8fd8ce5a5855 -r 1797671827b9 sat/tools/xml_tools.py --- a/sat/tools/xml_tools.py Wed Jan 02 18:50:57 2019 +0100 +++ b/sat/tools/xml_tools.py Thu Jan 03 20:49:21 2019 +0100 @@ -327,6 +327,11 @@ return u"%s%s" % (SAT_FORM_PREFIX, name) +def isXMLUICancelled(raw_xmlui): + """Tell if an XMLUI has been cancelled by checking raw XML""" + return C.bool(raw_xmlui.get(u'cancelled', C.BOOL_FALSE)) + + def XMLUIResultToElt(xmlui_data): """Construct result domish.Element from XMLUI result.