diff options
author | Jason DeTiberus <jdetiber@redhat.com> | 2015-11-13 15:09:15 -0500 |
---|---|---|
committer | Jason DeTiberus <jdetiber@redhat.com> | 2015-11-13 15:09:15 -0500 |
commit | 61adeef4c94eada5182539cf30c55c4b31534bf9 (patch) | |
tree | ca97424f67b69fde9e82fc4a8007851ea7248654 /roles | |
parent | 133bea98b62718fbc23d3c1f74e22665b5293603 (diff) | |
download | openshift-61adeef4c94eada5182539cf30c55c4b31534bf9.tar.gz openshift-61adeef4c94eada5182539cf30c55c4b31534bf9.tar.bz2 openshift-61adeef4c94eada5182539cf30c55c4b31534bf9.tar.xz openshift-61adeef4c94eada5182539cf30c55c4b31534bf9.zip |
pylint openshift_facts
Diffstat (limited to 'roles')
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 192c3c4bc..091ba4e2b 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -35,10 +35,8 @@ def first_ip(network): Returns: str: first IPv4 address """ - def atoi(addr): - return struct.unpack("!I", socket.inet_aton(addr))[0] - def itoa(addr): - return socket.inet_ntoa(struct.pack("!I", addr)) + atoi = lambda addr: struct.unpack("!I", socket.inet_aton(addr))[0] + itoa = lambda addr: socket.inet_ntoa(struct.pack("!I", addr)) (address, netmask) = network.split('/') netmask_i = (0xffffffff << (32 - atoi(netmask))) & 0xffffffff |