From: garciadeblas Date: Fri, 29 May 2020 15:00:49 +0000 (+0000) Subject: Minor fix in error_details, only shown for BROKEN or DEGRADED or old client versions X-Git-Tag: release-v8.0-start~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F05%2F9005%2F3;p=osm%2Fosmclient.git Minor fix in error_details, only shown for BROKEN or DEGRADED or old client versions Change-Id: I49b382204b41a7b7dc36753c351deaaf520d2a05 Signed-off-by: garciadeblas --- 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'])