Skip to content

Commit

Permalink
Fix #6326: bridge.show returns none when no bridge is found
Browse files Browse the repository at this point in the history
  • Loading branch information
Anbcorp committed Jul 26, 2013
1 parent 5de7cd5 commit 9d2ccc9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions salt/modules/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ def _linux_brshow(br=None):
brs[brname]['interfaces'].append(vals[0])

if br:
return brs[br]
try:
return brs[br]
except KeyError, ke :
return None
return brs


Expand Down Expand Up @@ -151,7 +154,10 @@ def _netbsd_brshow(br=None):
brs[brname]['stp'] = 'yes'

if br:
return brs[br]
try:
return brs[br]
except KeyError, ke :
return None
return brs


Expand Down

0 comments on commit 9d2ccc9

Please sign in to comment.