summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrius Sirvys <andrius.sirvys@intel.com>2019-08-08 15:37:52 +0100
committerKevin Traynor <ktraynor@redhat.com>2019-09-13 10:37:20 +0100
commit8a3f0ff807b5032d33b624d1331e3dad765d2358 (patch)
tree50b25042ccd0e470cc7c3eee81e3d0a0a9570788
parent4656108a0c0ca4fd1ac7a6d40b98c7b8d74b792b (diff)
downloaddpdk-stable-8a3f0ff807b5032d33b624d1331e3dad765d2358.zip
dpdk-stable-8a3f0ff807b5032d33b624d1331e3dad765d2358.tar.gz
dpdk-stable-8a3f0ff807b5032d33b624d1331e3dad765d2358.tar.xz
usertools: fix input handling in telemetry script
[ upstream commit a667070b09bb8cfbd83912045391d877ed88725e ] This commit removes the unnecesarry ast.literal_eval() function call from the input handling, which now relies just on raw_input() to get its input. Fixes: 53f293c9a783 ("usertools: replace unsafe input function") Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
-rw-r--r--usertools/dpdk-telemetry-client.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/usertools/dpdk-telemetry-client.py b/usertools/dpdk-telemetry-client.py
index 4afa2f8..e058702 100644
--- a/usertools/dpdk-telemetry-client.py
+++ b/usertools/dpdk-telemetry-client.py
@@ -76,7 +76,7 @@ class Client:
def repeatedlyRequestMetrics(self, sleep_time): # Recursively requests metrics for given client
print("\nPlease enter the number of times you'd like to continuously request Metrics:")
- n_requests = int(ast.literal_eval(raw_input("\n:")))
+ n_requests = int(raw_input("\n:"))
print("\033[F") #Removes the user input from screen, cleans it up
print("\033[K")
for i in range(n_requests):
@@ -91,7 +91,7 @@ class Client:
print("[3] Unregister client")
try:
- self.choice = int(ast.literal_eval(raw_input("\n:")))
+ self.choice = int(raw_input("\n:"))
print("\033[F") #Removes the user input for screen, cleans it up
print("\033[K")
if self.choice == 1: