diff --git a/confluent_client/bin/nodemedia b/confluent_client/bin/nodemedia index 6b09cc8c..a55cb106 100644 --- a/confluent_client/bin/nodemedia +++ b/confluent_client/bin/nodemedia @@ -81,10 +81,12 @@ def list_media(noderange, media): for res in session.read(resource): printerror(res) for node in res.get('databynode', []): - url = res['databynode'][node]['url'] - name = res['databynode'][node]['name'] + url = res['databynode'][node].get('url', None) + name = res['databynode'][node].get('name', None) if url and not res['databynode'][node].get('secure', False): name += ' (insecure)' + if not name: + continue print('{0}: {1}'.format(node, url + '/' + name if url else name))