From patchwork Thu Jan 30 16:32:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 11358431 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 49515139A for ; Thu, 30 Jan 2020 16:41:51 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C82420674 for ; Thu, 30 Jan 2020 16:41:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CiMJuNmo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C82420674 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:35864 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixCt4-00046V-9l for patchwork-qemu-devel@patchwork.kernel.org; Thu, 30 Jan 2020 11:41:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50827) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ixClD-0008PK-9K for qemu-devel@nongnu.org; Thu, 30 Jan 2020 11:33:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ixClA-0008Dt-Le for qemu-devel@nongnu.org; Thu, 30 Jan 2020 11:33:42 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:28460 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ixClA-00089U-DV for qemu-devel@nongnu.org; Thu, 30 Jan 2020 11:33:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580402018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vatf1cy30VQPVaui3AotPMnF2QHFo5F8BgR6ROFVBWw=; b=CiMJuNmo+o8+1bOe9FK9ff2qylnn5q5Wrk6vplLLDWAQeZ5II4ENKHog4vNzEaG51aiROk SYSrWvGMKAKPMZT7gM9CBxZviwk6wpq0cV8H2kNwYHFw9pvUxruT7ZkwMANyM3oujSq5gX nSchYtyIaPNqxagScgZGmE/R2Y23G8Q= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-432-nS_TdMLaOhKfNs6crHtG7w-1; Thu, 30 Jan 2020 11:33:36 -0500 X-MC-Unique: nS_TdMLaOhKfNs6crHtG7w-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6D0578010D0; Thu, 30 Jan 2020 16:33:34 +0000 (UTC) Received: from x1w.redhat.com (ovpn-205-184.brq.redhat.com [10.40.205.184]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 967A65DA75; Thu, 30 Jan 2020 16:33:29 +0000 (UTC) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2 05/12] scripts: Explicit usage of Python 3 (scripts with __main__) Date: Thu, 30 Jan 2020 17:32:25 +0100 Message-Id: <20200130163232.10446-6-philmd@redhat.com> In-Reply-To: <20200130163232.10446-1-philmd@redhat.com> References: <20200130163232.10446-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Kevin Wolf , Vladimir Sementsov-Ogievskiy , =?utf-8?q?Daniel_P?= =?utf-8?q?_=2E_Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, Juan Quintela , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Wainer dos Santos Moschetta , Michael Roth , kvm@vger.kernel.org, Stefan Hajnoczi , Cleber Rosa , Paolo Bonzini , Max Reitz , =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Use the program search path to find the Python 3 interpreter. Patch created mechanically by running: $ sed -i "s,^#\!/usr/bin/\(env\ \)\?python$,#\!/usr/bin/env python3," \ $(git grep -l 'if __name__.*__main__') Reported-by: Vladimir Sementsov-Ogievskiy Suggested-by: Daniel P. Berrangé Suggested-by: Stefan Hajnoczi Reviewed-by: Juan Quintela Acked-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- scripts/analyse-locks-simpletrace.py | 2 +- scripts/decodetree.py | 2 +- scripts/device-crash-test | 2 +- scripts/kvm/kvm_flightrecorder | 2 +- scripts/qapi-gen.py | 2 +- scripts/qmp/qemu-ga-client | 2 +- scripts/qmp/qmp | 2 +- scripts/qmp/qmp-shell | 2 +- scripts/qmp/qom-fuse | 2 +- scripts/render_block_graph.py | 2 +- scripts/replay-dump.py | 2 +- scripts/simpletrace.py | 2 +- scripts/tracetool.py | 2 +- scripts/vmstate-static-checker.py | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/scripts/analyse-locks-simpletrace.py b/scripts/analyse-locks-simpletrace.py index 7d9b574300..9c263d6e79 100755 --- a/scripts/analyse-locks-simpletrace.py +++ b/scripts/analyse-locks-simpletrace.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Analyse lock events and compute statistics diff --git a/scripts/decodetree.py b/scripts/decodetree.py index d8c59cab60..2a8f2b6e06 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2018 Linaro Limited # # This library is free software; you can redistribute it and/or diff --git a/scripts/device-crash-test b/scripts/device-crash-test index 15f213a6cd..25ee968b66 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (c) 2017 Red Hat Inc # diff --git a/scripts/kvm/kvm_flightrecorder b/scripts/kvm/kvm_flightrecorder index 54a56745e4..1391a84409 100755 --- a/scripts/kvm/kvm_flightrecorder +++ b/scripts/kvm/kvm_flightrecorder @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # KVM Flight Recorder - ring buffer tracing script # diff --git a/scripts/qapi-gen.py b/scripts/qapi-gen.py index f93f3c7c23..c7b0070db2 100755 --- a/scripts/qapi-gen.py +++ b/scripts/qapi-gen.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # QAPI generator # # This work is licensed under the terms of the GNU GPL, version 2 or later. diff --git a/scripts/qmp/qemu-ga-client b/scripts/qmp/qemu-ga-client index 30cf8a9a0d..e4568aff68 100755 --- a/scripts/qmp/qemu-ga-client +++ b/scripts/qmp/qemu-ga-client @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # QEMU Guest Agent Client # diff --git a/scripts/qmp/qmp b/scripts/qmp/qmp index 6cb46fdae2..f85a14a627 100755 --- a/scripts/qmp/qmp +++ b/scripts/qmp/qmp @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # QMP command line tool # diff --git a/scripts/qmp/qmp-shell b/scripts/qmp/qmp-shell index f1cddeafbc..9e122ad0c6 100755 --- a/scripts/qmp/qmp-shell +++ b/scripts/qmp/qmp-shell @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # Low-level QEMU shell on top of QMP. # diff --git a/scripts/qmp/qom-fuse b/scripts/qmp/qom-fuse index 4d85970a78..6bada2c33d 100755 --- a/scripts/qmp/qom-fuse +++ b/scripts/qmp/qom-fuse @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 ## # QEMU Object Model test tools # diff --git a/scripts/render_block_graph.py b/scripts/render_block_graph.py index 656f0388ad..409b4321f2 100755 --- a/scripts/render_block_graph.py +++ b/scripts/render_block_graph.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Render Qemu Block Graph # diff --git a/scripts/replay-dump.py b/scripts/replay-dump.py index ee7fda2638..0cdae879b7 100755 --- a/scripts/replay-dump.py +++ b/scripts/replay-dump.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Dump the contents of a recorded execution stream diff --git a/scripts/simpletrace.py b/scripts/simpletrace.py index 45485b864b..2bc043112a 100755 --- a/scripts/simpletrace.py +++ b/scripts/simpletrace.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Pretty-printer for simple trace backend binary trace files # diff --git a/scripts/tracetool.py b/scripts/tracetool.py index 3beaa66bd8..264cc9eecc 100755 --- a/scripts/tracetool.py +++ b/scripts/tracetool.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ diff --git a/scripts/vmstate-static-checker.py b/scripts/vmstate-static-checker.py index f8b7b8f772..d44dedd9e9 100755 --- a/scripts/vmstate-static-checker.py +++ b/scripts/vmstate-static-checker.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # Compares vmstate information stored in JSON format, obtained from # the -dump-vmstate QEMU command.