def getOperationByName(self, name):
    'Return a named operation item.'
    for item in self.operations:
        if (item.name == name):
            return item
    raise KeyError(('No operation named %s' % name))
Return a named operation item.
def getOperationByName(self, name):
    
    for item in self.operations:
        if (item.name == name):
            return item
    raise KeyError(('No operation named %s' % name))