From 7f4e0480526cb5786d51e04e1bf9856c118b50e7 Mon Sep 17 00:00:00 2001 From: Mateus Caruccio Date: Wed, 17 Oct 2018 03:53:39 -0300 Subject: [PATCH] kubespray-aws-inventory.py ported to python 3 (#3528) --- contrib/aws_inventory/kubespray-aws-inventory.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/aws_inventory/kubespray-aws-inventory.py b/contrib/aws_inventory/kubespray-aws-inventory.py index 65741bbda..bb31dcf1d 100755 --- a/contrib/aws_inventory/kubespray-aws-inventory.py +++ b/contrib/aws_inventory/kubespray-aws-inventory.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +from __future__ import print_function import boto3 import os import argparse @@ -13,7 +14,7 @@ class SearchEC2Tags(object): self.search_tags() if self.args.host: data = {} - print json.dumps(data, indent=2) + print(json.dumps(data, indent=2)) def parse_args(self): @@ -56,6 +57,6 @@ class SearchEC2Tags(object): } hosts['k8s-cluster'] = {'children':['kube-master', 'kube-node']} - print json.dumps(hosts, sort_keys=True, indent=2) + print(json.dumps(hosts, sort_keys=True, indent=2)) SearchEC2Tags()