usertools: fix flake8 compliance of telemetry script
authorBruce Richardson <bruce.richardson@intel.com>
Mon, 13 Sep 2021 10:51:35 +0000 (11:51 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 1 Oct 2021 15:30:01 +0000 (17:30 +0200)
Fix style errors reported by flake8.

Fixes: 6a2967c112a3 ("usertools: add new telemetry script")
Fixes: 2d9a697e41ca ("usertools: add file-prefix option for telemetry")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
usertools/dpdk-telemetry.py

index e04aa04..bdc617d 100755 (executable)
@@ -9,7 +9,6 @@ Allows the user input commands and read the Telemetry response.
 
 import socket
 import os
-import glob
 import json
 import errno
 import readline
@@ -102,8 +101,8 @@ readline.set_completer(readline_complete)
 readline.set_completer_delims(readline.get_completer_delims().replace('/', ''))
 
 parser = argparse.ArgumentParser()
-parser.add_argument('-f', '--file-prefix', \
-        help='Provide file-prefix for DPDK runtime directory', default='rte')
+parser.add_argument('-f', '--file-prefix', default='rte',
+                    help='Provide file-prefix for DPDK runtime directory')
 args = parser.parse_args()
-rdir = get_dpdk_runtime_dir(args.file_prefix)
-handle_socket(os.path.join(rdir, 'dpdk_telemetry.{}'.format(TELEMETRY_VERSION)))
+rd = get_dpdk_runtime_dir(args.file_prefix)
+handle_socket(os.path.join(rd, 'dpdk_telemetry.{}'.format(TELEMETRY_VERSION)))