def _findRow(subNo, model):
    """Finds a row in a given model which has a column with a given
    number."""
    items = model.findItems(str(subNo))
    if len(items) == 0:
        return None
    if len(items) > 1:
        raise IndexError('Too many items with sub number %s' % subNo)
    return items[0].row()
