def findViewWithAttributeOrRaise(self, attr, val, root="ROOT"):
        '''
        Finds the View or raise a ViewNotFoundException.

        @return: the View found
        @raise ViewNotFoundException: raise the exception if View not found
        '''

        view = self.findViewWithAttribute(attr, val, root)
        if view:
            return view
        else:
            raise ViewNotFoundException(attr, val, root)
def findViewWithAttributeOrRaise ( self , attr , val , root = "ROOT" ) : view = self . findViewWithAttribute ( attr , val , root ) if view : return view else : raise ViewNotFoundException ( attr , val , root )
Finds the View or raise a ViewNotFoundException.

        @return: the View found
        @raise ViewNotFoundException: raise the exception if View not found