Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 5BFA1E00C58; Fri, 15 Apr 2016 11:51:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.192.45 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-qg0-f45.google.com (mail-qg0-f45.google.com [209.85.192.45]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 94D19E00527 for ; Fri, 15 Apr 2016 11:51:38 -0700 (PDT) Received: by mail-qg0-f45.google.com with SMTP id j35so86385133qge.0 for ; Fri, 15 Apr 2016 11:51:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=E+REB8tAS+M+v15pzCWsLU7dwZxun9/VJ1sbKuGpvPQ=; b=vMM7U9fpnFLNeXg9MVNsjhE26s87s3Yw/BP/f2Ai/T859cR1kiNSCNoOtBr1YQOSzF 4ShrFfVNRjuFGkKzQ+hEv5pJ5itcnU4Zx+tX+r/pHXWgfy4nNkOjRCFsx7louNY7E2Yx RTfKvsnvBaCAPuHh4/H6ouNj3uFIfA2xC5gcKsdEiVHpfPJNgUSrWgbcFEa8KK/T+673 kgv68lhFQ+NOYj1nZD8p7W5tKCSeTVchnvEoMHblJlGgoj6icDCYCCsAf4Co1m8nyOB+ oPQdkEy4v0edL2gDeDuNs3s3ADOsJ378+PaiG5PVJ3cap3Q/uChnPv/K5N+Iih7UTh4Y gViA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=E+REB8tAS+M+v15pzCWsLU7dwZxun9/VJ1sbKuGpvPQ=; b=lya/xy1y14TzqEg18zdjAHsRPxtx8hKYZjIvtoS9RrZkb8dWZffNfBWc5dvA1TEPCJ 8WWROhFd963kVj7+6iT8mQpDBWte2MSc6NV2RlRVOdwA7bJW1OZYB86Dq6DmGOzFsqlq d/cPuE1wfqrv4Uh+rwmPftYIufQcD8UXWZD+aI981fNoJUv9cf6mtF1qKaul9hC+mlEo E26/9RrNKKi8uxvRYXXh1KMrQIeUHhsyW3D1357fnoVCt+oO4lge7bBAIjdy8vxmoEHp Bby+N/T3MegM3Lz+FQrgInBBCrF/cQNC8w5Kq56rMp45dvAG9p+eFKoIh0vfLYsWl6fF zJzQ== X-Gm-Message-State: AOPr4FUrjQzCyqWWD+Zgs9g7CW5rqpCzXH6HS0BE39e8weRU3mLGOYDPPeFIe/89lGqbiQ== X-Received: by 10.140.100.184 with SMTP id s53mr26385854qge.19.1460746297593; Fri, 15 Apr 2016 11:51:37 -0700 (PDT) Received: from ldnunes.lab.ossystems.com.br ([187.23.154.250]) by smtp.gmail.com with ESMTPSA id q10sm20826244qha.25.2016.04.15.11.51.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Apr 2016 11:51:37 -0700 (PDT) Sender: Lucas Nunes From: Lucas Dutra Nunes To: meta-freescale@yoctoproject.org Date: Fri, 15 Apr 2016 15:51:23 -0300 Message-Id: <1460746283-6622-1-git-send-email-ldnunes@ossystems.com.br> X-Mailer: git-send-email 2.1.4 Subject: [Documentation][PATCH] Scripts: generate one blank line if sphinx table is empty X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 18:51:39 -0000 An empty table without at least a empty line is not valid on Sphinx, so a blank line must be added when generating a table like so. Signed-off-by: Lucas Dutra Nunes --- scripts/doc_utils.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/doc_utils.py b/scripts/doc_utils.py index 9d11bd8..fe6dd88 100644 --- a/scripts/doc_utils.py +++ b/scripts/doc_utils.py @@ -21,9 +21,10 @@ def tabularize(lines, spacing=2): if lines: col_widths = map(lambda col: apply(max, map(len, col) + [0]), apply(zip, lines)) - return '\n'.join([format_header(lines[0], col_widths, spc), - format_body(lines[1:], col_widths, spc), - format_border(col_widths)]) + \ - '\n' + table_data = [format_header(lines[0], col_widths, spc), + format_body(lines[1:], col_widths, spc), + format_border(col_widths)] + table_data = filter(lambda x: len(x) > 0, table_data) + return '\n'.join(table_data) + '\n' else: return "" -- 2.1.4