def _validate_top_level(self, boxes):
        """Several boxes can only occur at the top level."""
        # Add the counts in the superboxes.
        for box in boxes:
            if hasattr(box, 'box'):
                self._check_superbox_for_top_levels(box.box)

        count = self._collect_box_count(boxes)

        # If there is one data reference box, then there must also be one ftbl.
        if 'dtbl' in count and 'ftbl' not in count:
            msg = ('The presence of a data reference box requires the '
                   'presence of a fragment table box as well.')
            raise IOError(msg)
def _validate_top_level ( self , boxes ) : for box in boxes : if hasattr ( box , 'box' ) : self . _check_superbox_for_top_levels ( box . box ) count = self . _collect_box_count ( boxes ) if 'dtbl' in count and 'ftbl' not in count : msg = ( 'The presence of a data reference box requires the ' 'presence of a fragment table box as well.' ) raise IOError ( msg )
Several boxes can only occur at the top level.