osm.py: minor fix when using ns-list --long 93/8793/2
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 13 Apr 2020 06:41:57 +0000 (06:41 +0000)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Mon, 20 Apr 2020 08:16:17 +0000 (08:16 +0000)
Change-Id: I159c6644363e9cf071eae6353207a41fa9586197
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
osmclient/scripts/osm.py

index 6245bb3..d405d6d 100755 (executable)
@@ -230,7 +230,7 @@ def ns_list(ctx, filter, long):
         summary = ""
         n_nets = 0
         status_nets = {}
-        net_list = status_dict['nets']
+        net_list = status_dict.get('nets',[])
         for net in net_list:
             n_nets += 1
             if net['status'] not in status_nets: