mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
mstpctlutil: fix strip on NoneType warning
saw this during execution of the below command: ifup --no-act -a Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
@ -74,10 +74,14 @@ class mstpctlutil(utilsBase):
|
||||
'''
|
||||
self.mstpctl_bridgeport_attrs_dict = {}
|
||||
self.mstpctl_bridgeport_attrs_dict[bridgename] = {}
|
||||
try:
|
||||
showall_output = self.subprocess_check_output(['/sbin/mstpctl',
|
||||
'showportdetail', bridgename, 'json']).strip('\n')
|
||||
if showall_output == None or showall_output == '':
|
||||
'showportdetail', bridgename, 'json'])
|
||||
except:
|
||||
pass
|
||||
if not showall_output or showall_output == '':
|
||||
return
|
||||
showall_output = showall_output.strip('\n')
|
||||
mstpctl_bridge_cache = json.loads(showall_output)
|
||||
for portname in mstpctl_bridge_cache.keys():
|
||||
# we will ignore the portid for now and just index
|
||||
|
Reference in New Issue
Block a user