From 4b7ced6e1e2581a1d52d889212cd260bfd7ec08b Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Nov 01 2018 10:05:28 +0000 Subject: [PATCH 1/3] standard-inventory-local: port to python3 --- diff --git a/inventory/standard-inventory-local b/inventory/standard-inventory-local index b126338..0c579cf 100755 --- a/inventory/standard-inventory-local +++ b/inventory/standard-inventory-local @@ -1,26 +1,6 @@ -#!/usr/bin/python2 - -# The MIT License (MIT) -# +#!/usr/bin/python3 +# SPDX Licence identifier MIT # Copyright (c) 2017-2018 Red Hat Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy of -# this software and associated documentation files (the "Software"), to deal in -# the Software without restriction, including without limitation the rights to -# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -# the Software, and to permit persons to whom the Software is furnished to do so, -# subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# # Author: Stef Walter import argparse From a90e45900b03b5612cda2166258496b76e742968 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Nov 01 2018 10:06:00 +0000 Subject: [PATCH 2/3] standard-inventory-qcow2: port to python3 --- diff --git a/inventory/standard-inventory-qcow2 b/inventory/standard-inventory-qcow2 index f317794..7bb55ea 100755 --- a/inventory/standard-inventory-qcow2 +++ b/inventory/standard-inventory-qcow2 @@ -1,4 +1,4 @@ -#!/usr/bin/python2 +#!/usr/bin/python3 import argparse import atexit @@ -443,7 +443,7 @@ def inv_host(image): child = os.fork() if child: # Need to figure out what python interpreter to use - interpreters = ["/usr/bin/python2", "/usr/bin/python3", "/usr/libexec/platform-python"] + interpreters = ["/usr/bin/python3", "/usr/bin/python2", "/usr/libexec/platform-python"] for interpreter in interpreters: check_file = [ "/usr/bin/ansible", From 50c9f707f15bb8c843bede46d18404a8f2f1ef18 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Nov 01 2018 10:06:40 +0000 Subject: [PATCH 3/3] standard-inventory-rpm: port to python3 --- diff --git a/inventory/standard-inventory-rpm b/inventory/standard-inventory-rpm index c24b444..ff007ef 100755 --- a/inventory/standard-inventory-rpm +++ b/inventory/standard-inventory-rpm @@ -1,26 +1,6 @@ -#!/usr/bin/python2 - -# The MIT License (MIT) -# +#!/usr/bin/python3 +# SPDX Licence identifier MIT # Copyright (c) 2017-2018 Red Hat Inc. -# -# Permission is hereby granted, free of charge, to any person obtaining a copy of -# this software and associated documentation files (the "Software"), to deal in -# the Software without restriction, including without limitation the rights to -# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -# the Software, and to permit persons to whom the Software is furnished to do so, -# subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# # Authors: Merlin Mathesius # Stef Walter