Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def bus_info(self):
try:
return ethtool.get_businfo(self.name)
except IOError as e:
log_exc_traceback()
return ""
def show_driver(interface, args = None):
try:
driver = ethtool.get_module(interface)
except IOError:
driver = "not implemented"
try:
bus = ethtool.get_businfo(interface)
except IOError:
bus = "not available"
printtab("driver: %s" % driver)
printtab("bus-info: %s" % bus)