Merge pull request #211 from mesosphere/package-list-table

improved the dcos package list output when a package lacks an app or …
This commit is contained in:
mgummelt
2015-06-09 09:04:18 -07:00
2 changed files with 5 additions and 5 deletions

View File

@@ -225,9 +225,9 @@ def package_table(packages):
fields = OrderedDict([
('NAME', lambda p: p['name']),
('APP', lambda p: p['app']['appId'] if 'app' in p else 'null'),
('APP', lambda p: '\n'.join(p['apps']) if p.get('apps') else '---'),
('COMMAND',
lambda p: p['command']['name'] if 'command' in p else 'null'),
lambda p: p['command']['name'] if 'command' in p else '---'),
('DESCRIPTION', lambda p: p['description'])
])

View File

@@ -8,9 +8,9 @@ def package_fixture():
"""
return {
"app": {
"appId": "/helloworld"
},
"apps": [
"/helloworld"
],
"command": {
"name": "helloworld"
},