All Apps and Add-ons

Python3 syntax error in AWS addon script aws_config_cli.py

vdonach
Observer

I believe there is a latent bug in the aws_config_cli.py script for the AWS Add-on.

The function list is from the latest version (5.2.0)

 

 

   def list(self):
        names = None
        if self.params.names:
            names = self.params.names.split(',')
        results = self.config_mgr.list(
            self.endpoint, self.params.hostname, names)
        items = []
        for result in results:
            item = copy.deepcopy(result['content'])
            item['name'] = result['name']
            items.append(item)
        print json.dumps(items, indent=2)

 

 

Notice the print command.  In Python 3, print is a function and thus requires braces.  For Python3, I believe the code should actually be print (json.dumps(items, indent=2))

Additionally,in compose_cli_args

for resource, desc in resources.iteritems():

should be

for resource, desc in resources.items():

 

 

Labels (2)
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...