X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fscripts%2Fosm.py;h=0523207fa4307283485c3edd5d31c95ff9838c9e;hb=refs%2Fchanges%2F99%2F8999%2F4;hp=402a09b8fa34badfe09efcda360b19e93f1a2dc8;hpb=eb1f0721fc65cedd7771cd5f2960c6faa227d597;p=osm%2Fosmclient.git diff --git a/osmclient/scripts/osm.py b/osmclient/scripts/osm.py index 402a09b..0523207 100755 --- a/osmclient/scripts/osm.py +++ b/osmclient/scripts/osm.py @@ -3097,7 +3097,7 @@ def k8scluster_list(ctx, filter, literal): for cluster in resp: table.add_row([cluster['name'], cluster['_id'], cluster['k8s_version'], cluster['vim_account'], json.dumps(cluster['nets']), cluster["_admin"]["operationalState"], - trunc_text(cluster.get('description',''),40)]) + trunc_text(cluster.get('description') or '', 40)]) table.align = 'l' print(table) # except ClientException as e: @@ -3264,7 +3264,7 @@ def repo_list(ctx, filter, literal): table = PrettyTable(['Name', 'Id', 'Type', 'URI', 'Description']) for repo in resp: #cluster['k8s-nets'] = json.dumps(yaml.safe_load(cluster['k8s-nets'])) - table.add_row([repo['name'], repo['_id'], repo['type'], repo['url'], trunc_text(repo.get('description',''),40)]) + table.add_row([repo['name'], repo['_id'], repo['type'], repo['url'], trunc_text(repo.get('description') or '',40)]) table.align = 'l' print(table)