diff --git a/lib/tool_shed/scripts/api/common.py b/lib/tool_shed/scripts/api/common.py index 13ea5847599..ef8651bcc06 100644 --- a/lib/tool_shed/scripts/api/common.py +++ b/lib/tool_shed/scripts/api/common.py @@ -94,8 +94,10 @@ def display( url, api_key=None, return_formatted=True ): print 'Collection Members' print '------------------' for n, i in enumerate(r): - # All collection members should have a name and url in the response. - print '#%d: %s' % (n+1, i.pop( 'url' ) ) + # All collection members should have a name in the response. + # url is optional + if 'url' in i: + print '#%d: %s' % (n+1, i.pop( 'url' ) ) if 'name' in i: print ' name: %s' % i.pop( 'name' ) for k, v in i.items(): diff --git a/scripts/api/common.py b/scripts/api/common.py index d81c351a5c2..d1a58b50d77 100644 --- a/scripts/api/common.py +++ b/scripts/api/common.py @@ -89,8 +89,10 @@ def display( api_key, url, return_formatted=True ): print 'Collection Members' print '------------------' for n, i in enumerate(r): - # All collection members should have a name and url in the response. - print '#%d: %s' % (n+1, i.pop( 'url' ) ) + # All collection members should have a name in the response. + # url is optional + if 'url' in i: + print '#%d: %s' % (n+1, i.pop( 'url' ) ) if 'name' in i: print ' name: %s' % i.pop( 'name' ) for k, v in i.items():