]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
scripts: Explicit usage of Python 3 (scripts with __main__)
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Thu, 30 Jan 2020 16:32:25 +0000 (17:32 +0100)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Fri, 7 Feb 2020 14:12:48 +0000 (15:12 +0100)
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 <vsementsov@virtuozzo.com>
Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200130163232.10446-6-philmd@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
14 files changed:
scripts/analyse-locks-simpletrace.py
scripts/decodetree.py
scripts/device-crash-test
scripts/kvm/kvm_flightrecorder
scripts/qapi-gen.py
scripts/qmp/qemu-ga-client
scripts/qmp/qmp
scripts/qmp/qmp-shell
scripts/qmp/qom-fuse
scripts/render_block_graph.py
scripts/replay-dump.py
scripts/simpletrace.py
scripts/tracetool.py
scripts/vmstate-static-checker.py

index 7d9b574300213dfbed46778d84ce58467e0787fa..9c263d6e7932bec8ea275e5d9ba2f2f21f9ee16f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 #
 # Analyse lock events and compute statistics
index d8c59cab603210909dae9f7851820c6a8d986e4a..2a8f2b6e065c897916be7216167203a7e47da530 100755 (executable)
@@ -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
index 15f213a6cdb061b0d7af89ddac9e39ff34edfe1c..25ee968b66f2ad643bd1a9458753f4d47ef8eb91 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #  Copyright (c) 2017 Red Hat Inc
 #
index 54a56745e429446405f0cf70e7e5ea4a2d79b7cb..1391a84409e42c83648ea4d8822aaaf30db11476 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # KVM Flight Recorder - ring buffer tracing script
 #
index f93f3c7c233e4edb9973fb9918b62f853f68ffad..c7b0070db2c6bb047273a862b291230e185cf799 100755 (executable)
@@ -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.
index 30cf8a9a0da6a436bf3ab52c3ffcbaa932ded79c..e4568aff6899ca59ae8c54641db7c05c7c728ee8 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 
 # QEMU Guest Agent Client
 #
index 6cb46fdae2821bd91b77847a796535b88a013145..f85a14a62742bc620a42a33e85cf8c13985f1cc4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 #
 # QMP command line tool
 #
index f1cddeafbc85da74503cb5be40c47c5cd2863606..9e122ad0c6ea9b6f1dd90d46811a08767427a7f8 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 #
 # Low-level QEMU shell on top of QMP.
 #
index 4d85970a78a8a3296cabb22ca205ad804a709d98..6bada2c33d3414763bc1f4d3c1c4e140e140cf84 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python3
 ##
 # QEMU Object Model test tools
 #
index 656f0388ad6b05840f1a77b1e150284c5ae89736..409b4321f2e8fe9ea24c9958ff08a53d4bd5184d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Render Qemu Block Graph
 #
index ee7fda263849ba671f83599459cd670a11e2c19d..0cdae879b729ff5cc2ba4146f6e16f8b5f397ffc 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 #
 # Dump the contents of a recorded execution stream
index 45485b864b11ca2037611a2658724d3200e49478..2bc043112a666f3f097fe2220db4f272646b6618 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Pretty-printer for simple trace backend binary trace files
 #
index 3beaa66bd8b5f126f3509c45b9a107bf53bad102..264cc9eeccf80c6a37e37983aabe04aee9495217 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 """
index f8b7b8f77252f2c03d6d7db9dc60ca0d6c618c59..d44dedd9e9b7c1a9e0043090ff3ab94fb17c3586 100755 (executable)
@@ -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.