Ticket: None
Reviewed By: Roopa
Testing Done: ifreload -a (vxlan interface file)
try:
showall_output = self.subprocess_check_output(['/sbin/mstpctl',
'showportdetail', bridgename, 'json'])
- except:
- pass
+ except Exception as e:
+ self.logger.warn(str(e))
+ return
if not showall_output or showall_output == '':
return
showall_output = showall_output.strip('\n')
return
try:
return subprocess.check_output(cmdl, stderr=subprocess.STDOUT)
- except Exception, e:
+ except subprocess.CalledProcessError as e:
raise Exception('failed to execute cmd \'%s\' (%s)'
%(' '.join(cmdl), e.output))
+ except Exception as e:
+ raise Exception('failed to execute cmd \'%s\' (%s)'
+ %(' '.join(cmdl), str(e)))
def subprocess_check_call(self, cmdl):
""" subprocess check_call implementation using popen