From: tierno Date: Fri, 27 Mar 2020 15:17:54 +0000 (+0000) Subject: bug 1045. Show error if any at ns-list when ns operation is PROCESSING X-Git-Tag: v7.1.0rc1^2~12 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=5d41362313f63d22266adb647a79a43eb993e8eb;p=osm%2Fosmclient.git bug 1045. Show error if any at ns-list when ns operation is PROCESSING Change-Id: I59698403c93fe232b804e607ab45feaa9c0a67e1 Signed-off-by: tierno --- diff --git a/osmclient/scripts/osm.py b/osmclient/scripts/osm.py index bd61408..e1dbb8e 100755 --- a/osmclient/scripts/osm.py +++ b/osmclient/scripts/osm.py @@ -359,8 +359,8 @@ def ns_list(ctx, filter, long): vim = vim_name current_operation = "{} ({})".format(nsr['currentOperation'],nsr['currentOperationID']) error_details = "N/A" - if ns_state == "BROKEN" or ns_state == "DEGRADED": - error_details = "{}\nDetail: {}".format(nsr['errorDescription'],nsr['errorDetail']) + if ns_state == "BROKEN" or ns_state == "DEGRADED" or nsr['errorDescription']: + error_details = "{}\nDetail: {}".format(nsr['errorDescription'], nsr['errorDetail']) else: nsopdata = ctx.obj.ns.get_opdata(ns['id']) nsr = nsopdata['nsr:nsr']