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: v7.1.2~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=0f3808c91298144341f0142088be7b2f656f8570;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 8dbf2b6..d4e2a38 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'])