X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fscripts%2Fosm.py;fp=osmclient%2Fscripts%2Fosm.py;h=a369c48afd1d6c11952a9f7e54337e3d507871de;hb=c706f69a072bef2b6e68d82fa1917d79ee2ee867;hp=78f7896a1ad4e5d4bc05910c216a2e81c86ea9ca;hpb=39b4a9c0594537a190fbdbb5c00bbc82e387bff8;p=osm%2Fosmclient.git diff --git a/osmclient/scripts/osm.py b/osmclient/scripts/osm.py index 78f7896..a369c48 100755 --- a/osmclient/scripts/osm.py +++ b/osmclient/scripts/osm.py @@ -368,7 +368,8 @@ def ns_list(ctx, filter, long): else: current_operation = "{} ({})".format(nsr['_admin'].get('current-operation','-'), nsr['_admin']['nslcmop']) error_details = "N/A" - if ns_state == "BROKEN" or ns_state == "DEGRADED" or nsr.get('errorDescription'): + if ns_state == "BROKEN" or ns_state == "DEGRADED" or \ + ('currentOperation' not in nsr and nsr.get('errorDescription')): error_details = "{}\nDetail: {}".format(nsr['errorDescription'], nsr['errorDetail']) else: nsopdata = ctx.obj.ns.get_opdata(ns['id'])