first pass at removing all python2 specific dependencies, updating python requirements.txt/setup.py/Pipfiles/Makefiles, and removing python2 compat imports
This commit is contained in:
parent
5d5ffb70c2
commit
6edd6a7fdb
13 changed files with 89 additions and 143 deletions
|
@ -3,8 +3,6 @@ nrl.py: defines services provided by NRL protolib tools hosted here:
|
|||
http://www.nrl.navy.mil/itd/ncs/products
|
||||
"""
|
||||
|
||||
from past.builtins import filter
|
||||
|
||||
from core import utils
|
||||
from core.nodes.ipaddress import Ipv4Prefix
|
||||
from core.services.coreservices import CoreService
|
||||
|
@ -94,7 +92,7 @@ class NrlNhdp(NrlService):
|
|||
cmd += " -flooding ecds"
|
||||
cmd += " -smfClient %s_smf" % node.name
|
||||
|
||||
netifs = filter(lambda x: not getattr(x, "control", False), node.netifs())
|
||||
netifs = list(filter(lambda x: not getattr(x, "control", False), node.netifs()))
|
||||
if len(netifs) > 0:
|
||||
interfacenames = map(lambda x: x.name, netifs)
|
||||
cmd += " -i "
|
||||
|
@ -128,7 +126,7 @@ class NrlSmf(NrlService):
|
|||
cmd = "nrlsmf instance %s_smf" % node.name
|
||||
|
||||
servicenames = map(lambda x: x.name, node.services)
|
||||
netifs = filter(lambda x: not getattr(x, "control", False), node.netifs())
|
||||
netifs = list(filter(lambda x: not getattr(x, "control", False), node.netifs()))
|
||||
if len(netifs) == 0:
|
||||
return ""
|
||||
|
||||
|
@ -218,7 +216,7 @@ class NrlOlsrv2(NrlService):
|
|||
|
||||
cmd += " -p olsr"
|
||||
|
||||
netifs = filter(lambda x: not getattr(x, "control", False), node.netifs())
|
||||
netifs = list(filter(lambda x: not getattr(x, "control", False), node.netifs()))
|
||||
if len(netifs) > 0:
|
||||
interfacenames = map(lambda x: x.name, netifs)
|
||||
cmd += " -i "
|
||||
|
@ -246,7 +244,7 @@ class OlsrOrg(NrlService):
|
|||
Generate the appropriate command-line based on node interfaces.
|
||||
"""
|
||||
cmd = cls.startup[0]
|
||||
netifs = filter(lambda x: not getattr(x, "control", False), node.netifs())
|
||||
netifs = list(filter(lambda x: not getattr(x, "control", False), node.netifs()))
|
||||
if len(netifs) > 0:
|
||||
interfacenames = map(lambda x: x.name, netifs)
|
||||
cmd += " -i "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue