Merge pull request #6327 from Anbcorp/bridge_fixes

Fix #6326: bridge.show returns none when no bridge is found
This commit is contained in:
Joseph Hall 2013-07-26 07:28:48 -07:00
commit 04914f6b1a

View File

@ -74,7 +74,10 @@ def _linux_brshow(br=None):
brs[brname]['interfaces'].append(vals[0]) brs[brname]['interfaces'].append(vals[0])
if br: if br:
try:
return brs[br] return brs[br]
except KeyError, ke :
return None
return brs return brs
@ -151,7 +154,10 @@ def _netbsd_brshow(br=None):
brs[brname]['stp'] = 'yes' brs[brname]['stp'] = 'yes'
if br: if br:
try:
return brs[br] return brs[br]
except KeyError, ke :
return None
return brs return brs