From 6a5859fc07fb541b175c387575a906990726afd7 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 18 Oct 2023 00:37:00 +0900 Subject: [PATCH] Fix python shebang The current shebang requires /usr/bin/python which is not available in Ubuntu Jammy by default. This also fixes some unnecessary/missing shebangs. Change-Id: Ib25a0a7f39f68f43622609391710dd3b1abc2d00 --- neutron/cmd/destroy_patch_ports.py | 2 ++ neutron/cmd/ovn/migration_mtu.py | 2 ++ .../ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py | 2 +- neutron/server/api_eventlet.py | 2 +- neutron/server/rpc_eventlet.py | 3 +-- neutron/server/wsgi_eventlet.py | 2 +- neutron/tests/common/agents/l3_agent.py | 2 +- neutron/tests/common/agents/ovs_agent.py | 2 +- neutron/tests/fullstack/agents/dhcp_agent.py | 2 +- neutron/tests/fullstack/agents/l3_agent.py | 2 +- neutron/tests/fullstack/agents/ovs_agent.py | 2 +- neutron/tests/fullstack/servers/placement.py | 2 +- .../functional/agent/l3/bin/cmd_keepalived_state_change.py | 3 ++- neutron/tests/functional/agent/linux/bin/ip_monitor.py | 2 +- neutron/tests/functional/agent/linux/bin/ipt_binname.py | 2 +- neutron/tests/functional/agent/linux/simple_daemon.py | 2 ++ neutron/tests/functional/cmd/process_spawn.py | 2 ++ neutron/tests/unit/agent/linux/failing_process.py | 2 ++ 18 files changed, 24 insertions(+), 14 deletions(-) diff --git a/neutron/cmd/destroy_patch_ports.py b/neutron/cmd/destroy_patch_ports.py index 62401fbe206..9ff0bb0f802 100644 --- a/neutron/cmd/destroy_patch_ports.py +++ b/neutron/cmd/destroy_patch_ports.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + # Copyright 2020 Red Hat, Inc. # All Rights Reserved. # diff --git a/neutron/cmd/ovn/migration_mtu.py b/neutron/cmd/ovn/migration_mtu.py index f9c94a9b3c5..5746e49f6f0 100644 --- a/neutron/cmd/ovn/migration_mtu.py +++ b/neutron/cmd/ovn/migration_mtu.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + # Copyright 2018 Red Hat, Inc. # All Rights Reserved. # diff --git a/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py b/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py index 515fe9fcd8d..3e049bd553f 100644 --- a/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py +++ b/neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# # Copyright 2012 Cisco Systems, Inc. # All Rights Reserved. # diff --git a/neutron/server/api_eventlet.py b/neutron/server/api_eventlet.py index 624c16747e3..194514aad19 100644 --- a/neutron/server/api_eventlet.py +++ b/neutron/server/api_eventlet.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# # Copyright (c) 2022, OVH SAS # All Rights Reserved. # diff --git a/neutron/server/rpc_eventlet.py b/neutron/server/rpc_eventlet.py index b445279750e..a6736e6d444 100644 --- a/neutron/server/rpc_eventlet.py +++ b/neutron/server/rpc_eventlet.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +# # Copyright 2011 VMware, Inc. # All Rights Reserved. # diff --git a/neutron/server/wsgi_eventlet.py b/neutron/server/wsgi_eventlet.py index a2b3a342274..67bf31c7a56 100644 --- a/neutron/server/wsgi_eventlet.py +++ b/neutron/server/wsgi_eventlet.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at diff --git a/neutron/tests/common/agents/l3_agent.py b/neutron/tests/common/agents/l3_agent.py index 3281982cb0f..cbfc7417e98 100755 --- a/neutron/tests/common/agents/l3_agent.py +++ b/neutron/tests/common/agents/l3_agent.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain diff --git a/neutron/tests/common/agents/ovs_agent.py b/neutron/tests/common/agents/ovs_agent.py index 710c3b58c25..3da2e9732bd 100755 --- a/neutron/tests/common/agents/ovs_agent.py +++ b/neutron/tests/common/agents/ovs_agent.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain diff --git a/neutron/tests/fullstack/agents/dhcp_agent.py b/neutron/tests/fullstack/agents/dhcp_agent.py index af613c36aea..7711ff27db8 100755 --- a/neutron/tests/fullstack/agents/dhcp_agent.py +++ b/neutron/tests/fullstack/agents/dhcp_agent.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2016 OVH SAS # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/neutron/tests/fullstack/agents/l3_agent.py b/neutron/tests/fullstack/agents/l3_agent.py index d685d893a21..6f6320b8493 100755 --- a/neutron/tests/fullstack/agents/l3_agent.py +++ b/neutron/tests/fullstack/agents/l3_agent.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2017 Eayun, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/neutron/tests/fullstack/agents/ovs_agent.py b/neutron/tests/fullstack/agents/ovs_agent.py index 6f73ca78c8e..6f1af2e6b8b 100755 --- a/neutron/tests/fullstack/agents/ovs_agent.py +++ b/neutron/tests/fullstack/agents/ovs_agent.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2017 OVH SAS # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/neutron/tests/fullstack/servers/placement.py b/neutron/tests/fullstack/servers/placement.py index fce770b707c..98fc755b73f 100755 --- a/neutron/tests/fullstack/servers/placement.py +++ b/neutron/tests/fullstack/servers/placement.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2019 Ericsson # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/neutron/tests/functional/agent/l3/bin/cmd_keepalived_state_change.py b/neutron/tests/functional/agent/l3/bin/cmd_keepalived_state_change.py index 8639b838955..50f6fd90eea 100755 --- a/neutron/tests/functional/agent/l3/bin/cmd_keepalived_state_change.py +++ b/neutron/tests/functional/agent/l3/bin/cmd_keepalived_state_change.py @@ -1,4 +1,5 @@ -#!/usr/bin/python +#!/usr/bin/env python3 + # Copyright (c) 2015 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/neutron/tests/functional/agent/linux/bin/ip_monitor.py b/neutron/tests/functional/agent/linux/bin/ip_monitor.py index 5a7f4adec37..13525d8160b 100755 --- a/neutron/tests/functional/agent/linux/bin/ip_monitor.py +++ b/neutron/tests/functional/agent/linux/bin/ip_monitor.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2019 Red Hat, Inc. # All Rights Reserved. diff --git a/neutron/tests/functional/agent/linux/bin/ipt_binname.py b/neutron/tests/functional/agent/linux/bin/ipt_binname.py index eeb14cf871c..e6f77ed20c2 100755 --- a/neutron/tests/functional/agent/linux/bin/ipt_binname.py +++ b/neutron/tests/functional/agent/linux/bin/ipt_binname.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/env python3 # Copyright (C) 2014 VA Linux Systems Japan K.K. # Copyright (C) 2014 YAMAMOTO Takashi diff --git a/neutron/tests/functional/agent/linux/simple_daemon.py b/neutron/tests/functional/agent/linux/simple_daemon.py index 8e3c0d4d4f9..6e7b13f5d1b 100644 --- a/neutron/tests/functional/agent/linux/simple_daemon.py +++ b/neutron/tests/functional/agent/linux/simple_daemon.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + # Copyright 2014 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/neutron/tests/functional/cmd/process_spawn.py b/neutron/tests/functional/cmd/process_spawn.py index 4e082fa1e81..848b8b9fe69 100644 --- a/neutron/tests/functional/cmd/process_spawn.py +++ b/neutron/tests/functional/cmd/process_spawn.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + # Copyright 2016 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may diff --git a/neutron/tests/unit/agent/linux/failing_process.py b/neutron/tests/unit/agent/linux/failing_process.py index 29547ca1530..ae5b6392f5f 100644 --- a/neutron/tests/unit/agent/linux/failing_process.py +++ b/neutron/tests/unit/agent/linux/failing_process.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + # Copyright 2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may