'Generator that yields active filestore children in priority order.'

def GetChildrenByPriority(self, allow_external=True):

    for child in sorted(self.OpenChildren(), key=(lambda x: x.PRIORITY)):
        if ((not allow_external) and child.EXTERNAL):
            continue
        if child.Get(child.Schema.ACTIVE):
            (yield child)
