'Exit app if the rsp XMLNode indicates failure.'

def testFailure(cls, rsp, exit=True):

    if (rsp['stat'] == 'fail'):
        sys.stderr.write(('%s\n' % cls.getPrintableError(rsp)))
        if exit:
            sys.exit(1)
