usertools: fix telemetry client with python 3
authorRobin Jarry <robin.jarry@6wind.com>
Thu, 17 Oct 2019 17:32:12 +0000 (19:32 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 27 Oct 2019 20:38:40 +0000 (21:38 +0100)
commitfe35622659edc678992aea389beb152105051e7f
tree9d6d3adfff0fb9de33b3dcc75de424c83cd4302a
parent4da069194ef4578aac7ae10cf05abd992c61723c
usertools: fix telemetry client with python 3

When running the dpdk-telemetry-client.py with python 3, we get the
following syntax errors:

  File "usertools/dpdk-telemetry-client.py", line 70
      print "\nResponse: \n", str(data)
                           ^
  SyntaxError: invalid syntax

  File "usertools/dpdk-telemetry-client.py", line 93
      print "\nResponse: \n", str(data)
                           ^
  SyntaxError: invalid syntax

  File "usertools/dpdk-telemetry-client.py", line 111
      file_path = sys.argv[1]
                            ^
  TabError: inconsistent use of tabs and spaces in indentation

Import print_function from __future__ and add parentheses where missing.
Also, use spaces for indentation everywhere.

Fixes: d1b94da4a4e0 ("usertools: add client script for telemetry")
Fixes: 53f293c9a783 ("usertools: replace unsafe input function")
Fixes: 4080e46c8078 ("telemetry: support global metrics")
Cc: stable@dpdk.org
Signed-off-by: Robin Jarry <robin.jarry@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
usertools/dpdk-telemetry-client.py