make this py3 compatible (#22)

* make this py3 compatible
This commit is contained in:
alanhlam 2019-11-21 22:20:08 -08:00 committed by GitHub
parent 3d8f61a3ad
commit 174d656cf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -9,13 +9,13 @@ class FilterModule(object):
}
def to_nebula_ip(self, ip_str):
ip_list = map(int, ip_str.split("."))
ip_list = list(map(int, ip_str.split(".")))
ip_list[0] = 10
ip_list[1] = 168
ip = '.'.join(map(str, ip_list))
return ip
def map_to_nebula_ips(self, ip_strs):
ip_list = [ self.to_nebula_ip(ip_str) for ip_str in ip_strs ]
ips = ', '.join(ip_list)
ip_list = [ self.to_nebula_ip(ip_str) for ip_str in ip_strs ]
ips = ', '.join(ip_list)
return ips