Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def flags2str(flags):
string = ""
if flags & ethtool.IFF_UP:
string += "UP "
if flags & ethtool.IFF_BROADCAST:
string += "BROADCAST "
if flags & ethtool.IFF_DEBUG:
string += "DEBUG "
if flags & ethtool.IFF_LOOPBACK:
string += "LOOPBACK "
if flags & ethtool.IFF_POINTOPOINT:
string += "POINTOPOINT "
if flags & ethtool.IFF_NOTRAILERS:
string += "NOTRAILERS "
if flags & ethtool.IFF_RUNNING:
string += "RUNNING "
if flags & ethtool.IFF_NOARP:
string += "NOARP "
if flags & ethtool.IFF_PROMISC:
string += "PROMISC "
if flags & ethtool.IFF_ALLMULTI:
string += "ALLMULTI "
if flags & ethtool.IFF_MASTER:
string += "MASTER "
if flags & ethtool.IFF_SLAVE:
string += "SLAVE "
if flags & ethtool.IFF_MULTICAST:
string += "MULTICAST "
if flags & ethtool.IFF_PORTSEL:
string += "PORTSEL "
if flags & ethtool.IFF_AUTOMEDIA: