From 180cc6aedacaa09db8d9c8faa8c6fe91f752be7e Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 8 Jun 2020 16:40:44 -0700 Subject: [PATCH] Be more explicit about using python3 to run tools/ We have python scripts in the tools/ dir the vast majority of which we run regularly with python3 via our python3 default basepython in tox. However, most of these use a `python` shebang line which can be confusing as to whether or not these scripts run under python3 or not. To make this more clear set them to python3. I've confirmed the scripts running under tox are happy with these changes. For the ones that don't run under tox I've done a quick review and they look happy too. Change-Id: I983d23c33f7780e5708aa728c829c3262fc99ea0 --- tools/add-projects-to-main.py | 2 +- tools/batch_update_projects.py | 2 +- tools/check_gerrit_projects_changed.py | 2 +- tools/check_gerrit_projects_changed.sh | 2 +- tools/check_irc_access.py | 2 +- tools/check_valid_gerrit_projects.py | 2 +- tools/ci2project.py | 2 +- tools/fix-neutron-stadium.py | 2 +- tools/irc_tests.py | 2 +- tools/normalize_acl.py | 2 +- tools/normalize_channels_yaml.py | 2 +- tools/normalize_projects_yaml.py | 2 +- tools/zuul-projects-checks.py | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/add-projects-to-main.py b/tools/add-projects-to-main.py index f661ea9b69..585e189124 100644 --- a/tools/add-projects-to-main.py +++ b/tools/add-projects-to-main.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2017 Red Hat, Inc. # diff --git a/tools/batch_update_projects.py b/tools/batch_update_projects.py index c6e4680407..b623f699c3 100644 --- a/tools/batch_update_projects.py +++ b/tools/batch_update_projects.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/tools/check_gerrit_projects_changed.py b/tools/check_gerrit_projects_changed.py index 16be494fe1..b751829ae3 100644 --- a/tools/check_gerrit_projects_changed.py +++ b/tools/check_gerrit_projects_changed.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Check that gerrit/projects.yaml changes are valid. # diff --git a/tools/check_gerrit_projects_changed.sh b/tools/check_gerrit_projects_changed.sh index 55bd5610e8..a65c05f1bd 100755 --- a/tools/check_gerrit_projects_changed.sh +++ b/tools/check_gerrit_projects_changed.sh @@ -13,7 +13,7 @@ cp gerrit/projects.yaml gerrit/projects-old.yaml # check_gerrit_projects_changed.py invocation might be an old version. git checkout $GITHEAD -python tools/check_gerrit_projects_changed.py gerrit/projects-old.yaml \ +python3 tools/check_gerrit_projects_changed.py gerrit/projects-old.yaml \ gerrit/projects.yaml rm gerrit/projects-old.yaml diff --git a/tools/check_irc_access.py b/tools/check_irc_access.py index 8de0e6eee3..a538d967e3 100755 --- a/tools/check_irc_access.py +++ b/tools/check_irc_access.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # Copyright 2011, 2013-2014 OpenStack Foundation # Copyright 2012 Hewlett-Packard Development Company, L.P. diff --git a/tools/check_valid_gerrit_projects.py b/tools/check_valid_gerrit_projects.py index 88ef793e51..8bebffb0f2 100755 --- a/tools/check_valid_gerrit_projects.py +++ b/tools/check_valid_gerrit_projects.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Check that gerrit/projects.yaml contains valid entries. # diff --git a/tools/ci2project.py b/tools/ci2project.py index 371b0b2381..fb8b2fe981 100644 --- a/tools/ci2project.py +++ b/tools/ci2project.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # Copyright 2014 OpenStack Foundation # diff --git a/tools/fix-neutron-stadium.py b/tools/fix-neutron-stadium.py index 17a8bbb783..bd63797279 100644 --- a/tools/fix-neutron-stadium.py +++ b/tools/fix-neutron-stadium.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2017 Red Hat, Inc. # diff --git a/tools/irc_tests.py b/tools/irc_tests.py index 0d4a3f1a19..b1e34a4c81 100755 --- a/tools/irc_tests.py +++ b/tools/irc_tests.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # Copyright 2015 SUSE Linux GmbH # diff --git a/tools/normalize_acl.py b/tools/normalize_acl.py index fcfbcfab03..cd71d31fb3 100755 --- a/tools/normalize_acl.py +++ b/tools/normalize_acl.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 # a copy of the License at diff --git a/tools/normalize_channels_yaml.py b/tools/normalize_channels_yaml.py index e11b11cedb..ff2c645810 100755 --- a/tools/normalize_channels_yaml.py +++ b/tools/normalize_channels_yaml.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # diff --git a/tools/normalize_projects_yaml.py b/tools/normalize_projects_yaml.py index 26e42732b1..951363aa8f 100755 --- a/tools/normalize_projects_yaml.py +++ b/tools/normalize_projects_yaml.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # diff --git a/tools/zuul-projects-checks.py b/tools/zuul-projects-checks.py index c65a55cd18..5f3482b4c7 100755 --- a/tools/zuul-projects-checks.py +++ b/tools/zuul-projects-checks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright 2017 SUSE Linux GmbH #