From 174d656cf91d5d75b40cbbf35639a2a0af0db88d Mon Sep 17 00:00:00 2001 From: alanhlam Date: Thu, 21 Nov 2019 22:20:08 -0800 Subject: [PATCH] make this py3 compatible (#22) * make this py3 compatible --- .../ansible/filter_plugins/to_nebula_ip.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/quickstart-vagrant/ansible/filter_plugins/to_nebula_ip.py b/examples/quickstart-vagrant/ansible/filter_plugins/to_nebula_ip.py index d7bb31a..a21e82d 100644 --- a/examples/quickstart-vagrant/ansible/filter_plugins/to_nebula_ip.py +++ b/examples/quickstart-vagrant/ansible/filter_plugins/to_nebula_ip.py @@ -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