summaryrefslogtreecommitdiffstats
path: root/roles/os_firewall
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2016-11-22 13:51:20 -0500
committerGitHub <noreply@github.com>2016-11-22 13:51:20 -0500
commit11594f847088c4428bc2734b181b63766f895c31 (patch)
tree78836b6d325465f96449223577012396a6a7f2ca /roles/os_firewall
parent2969e4ede4e6337df0f4f48520b4c38b99d4eb1a (diff)
parentf709c76f727dd8166851d01d205fe2159449c854 (diff)
downloadopenshift-11594f847088c4428bc2734b181b63766f895c31.tar.gz
openshift-11594f847088c4428bc2734b181b63766f895c31.tar.bz2
openshift-11594f847088c4428bc2734b181b63766f895c31.tar.xz
openshift-11594f847088c4428bc2734b181b63766f895c31.zip
Merge pull request #2838 from mscherer/port_py3
Make os_firewall_manage_iptables run on python3
Diffstat (limited to 'roles/os_firewall')
-rwxr-xr-xroles/os_firewall/library/os_firewall_manage_iptables.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/roles/os_firewall/library/os_firewall_manage_iptables.py b/roles/os_firewall/library/os_firewall_manage_iptables.py
index bd638b69b..37bb16f35 100755
--- a/roles/os_firewall/library/os_firewall_manage_iptables.py
+++ b/roles/os_firewall/library/os_firewall_manage_iptables.py
@@ -139,7 +139,7 @@ class IpTablesManager(object): # pylint: disable=too-many-instance-attributes
output = check_output(cmd, stderr=subprocess.STDOUT)
# break the input rules into rows and columns
- input_rules = [s.split() for s in output.split('\n')]
+ input_rules = [s.split() for s in to_native(output).split('\n')]
# Find the last numbered rule
last_rule_num = None
@@ -269,5 +269,6 @@ def main():
# pylint: disable=redefined-builtin, unused-wildcard-import, wildcard-import
# import module snippets
from ansible.module_utils.basic import *
+from ansible.module_utils._text import to_native
if __name__ == '__main__':
main()