Skip to content

Commit

Permalink
[teamshow]: Return N/A if no memember exists in team (sonic-net#35)
Browse files Browse the repository at this point in the history
Signed-off-by: Sihui Han <[email protected]>
  • Loading branch information
sihuihan88 authored and Shuotian Cheng committed Apr 21, 2017
1 parent 5f90ff9 commit 45a8d38
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/teamshow
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,13 @@ class Teamshow(object):
info['protocol'] += '(N/A)'

info['ports'] = ""
for port in json_info['ports']:
info['ports'] += port
info['ports'] += '(S)' if json_info['ports'][port]['runner']['selected'] else '(D)'
info['ports'] += ' '
if 'ports' not in json_info:
info['ports'] = 'N/A'
else:
for port in json_info['ports']:
info['ports'] += port
info['ports'] += '(S)' if json_info['ports'][port]['runner']['selected'] else '(D)'
info['ports'] += ' '
self.summary[team_id] = info

def display_summary(self):
Expand Down

0 comments on commit 45a8d38

Please sign in to comment.