From patchwork Fri Mar 16 18:05:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 131937 Delivered-To: patch@linaro.org Received: by 10.80.152.129 with SMTP id j1csp640995edb; Fri, 16 Mar 2018 11:10:28 -0700 (PDT) X-Google-Smtp-Source: AG47ELvefY+i61MiQH/AtHgGiN83+N5iv6GHG8f6FYXtGmQNHA+St77pyHX60g3WlNKakf6UBsdD X-Received: by 2002:a9d:61c2:: with SMTP id h2-v6mr1724965otk.236.1521223828484; Fri, 16 Mar 2018 11:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521223828; cv=none; d=google.com; s=arc-20160816; b=lvfpMZ7Vtwjit5xFeGDgnjGEkmBjNDR/twZNLvDrjDSL5jtigxjDp0w+y86UqYy1Gq A9Bo3jST6u2QFUdBf2+uOvxG5XPMOjlVQ+dKBESvQUALLGK0u4qoK/7j/qX2sRlUG6Wq kVvym5WUUKG5rXLZAPKl3qXp56KviNXs9AcUxywk7cwXmxTut+Yh5g/3v2TC0k1Abzra Pl8jZ/0puXnIkFf32W1hDNjWoC4SQCzTDab2SqiadVI5EhkcEamTRTuRVvis3ZF60Ofz rQr1hhZwSMjjhrb+U3o8j8fUkUyMspwT8Zfua06x+KKnmzAg8VsJ6bG+CtYzaOK7Z30x Q8Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:references :in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=a2X0X+EEKMKp13b8JgLLzQ8azCGIG6RjklVj9C4ZnVw=; b=UsE7Dvfaw5Cv9zupYxfhksrk3W4qva5wS95hkim/W466OKnEh6E4Uib7DUBgZc8eYH q2C0YgcB8ebDFpTtddU1f+qoSDNVc6WkET68eIw2Zxx6WoBzr8QPdKIQ2bKye5ijFPzG KykIQaQKtGRVum8P46igr4X4P88zShrvtMCMpIekIq+hk1OKGRxSwv7kyal9DJKGTMPk Ch4SbCSFaWes19HxPrhu2Ma+UUd5HFpsghuRlMJpbM/AhM926RdgZJWqkjOpR5Jz6HFc AcC1kXzclDYfULlaXPrv+BWz34l5VAkAoxyIe3NkLucloHmXysmWxXtsb3UuVM2lNCrM AuXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id v91si2326986otb.410.2018.03.16.11.10.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Mar 2018 11:10:28 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D96DE2821D; Fri, 16 Mar 2018 18:10:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BCFAB600D1; Fri, 16 Mar 2018 18:10:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 658904CA99; Fri, 16 Mar 2018 18:10:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2GI5PKn000455 for ; Fri, 16 Mar 2018 14:05:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7FC8D5D72D; Fri, 16 Mar 2018 18:05:25 +0000 (UTC) Delivered-To: libvirt-list@redhat.com Received: from worklaptop.redhat.com (ovpn-116-212.phx2.redhat.com [10.3.116.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id E11EC5D72A; Fri, 16 Mar 2018 18:05:24 +0000 (UTC) From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 16 Mar 2018 14:05:11 -0400 Message-Id: <2ea88b534bc8b763b5d56e181c94ee7662d35414.1521222704.git.crobinso@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: Andrea Bolognani Subject: [libvirt] [PATCH 1/2] apibuild: Fix errors on python3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 16 Mar 2018 18:10:23 +0000 (UTC) Module 'string' function lower doesn't exist in python3. The canonical way is to call .lower() on a str instance. Do that, and make the exception handling more specific, which would have made this issue obvious. Signed-off-by: Cole Robinson --- docs/apibuild.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list Reviewed-by: Daniel P. Berrangé diff --git a/docs/apibuild.py b/docs/apibuild.py index 67b7eed1e..e81980e3c 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -2326,10 +2326,10 @@ class docBuilder: for data in ('Summary', 'Description', 'Author'): try: output.write(" <%s>%s\n" % ( - string.lower(data), + data.lower(), escape(dict.info[data]), - string.lower(data))) - except: + data.lower())) + except KeyError: self.warning("Header %s lacks a %s description" % (module, data)) if 'Description' in dict.info: desc = dict.info['Description']