From aa2f17426996e97093f66701d1e3997101723655 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Wed, 8 Jun 2022 16:37:42 +0200 Subject: [PATCH] Remove eval function Change-Id: I8e042d9e27d225d623a87418503ea0d71f864207 Signed-off-by: garciadeblas --- osmclient/scripts/osm.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/osmclient/scripts/osm.py b/osmclient/scripts/osm.py index 7af3013..ca79545 100755 --- a/osmclient/scripts/osm.py +++ b/osmclient/scripts/osm.py @@ -5659,8 +5659,7 @@ def alarm_show(ctx, uuid): table = PrettyTable(["key", "attribute"]) try: # Arrange and return the response data - resp = resp.replace("ObjectId", "") - alarm = eval(resp) + alarm = resp.replace("ObjectId", "") for key in alarm_filter: if key == "uuid": value = alarm.get(key) @@ -5702,7 +5701,6 @@ def alarm_list(ctx, ns_id): if resp: # return the response data in a table resp = resp.replace("ObjectId", "") - resp = eval(resp) for alarm in resp: table.add_row( [ -- 2.25.1