From: garciadeblas Date: Wed, 8 Jun 2022 14:37:42 +0000 (+0200) Subject: Remove eval function X-Git-Tag: v12.0.0rc1~10 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F87%2F12187%2F2;p=osm%2Fosmclient.git Remove eval function Change-Id: I8e042d9e27d225d623a87418503ea0d71f864207 Signed-off-by: garciadeblas --- 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( [