travis-ci
2 of 2 new or added lines in 1 file covered. (100.0%)
274 of 277 relevant lines covered (98.92%)
6.84 hits per line
1 |
"""Intended for internal use only."""
|
|
2 |
import sys |
7✔ |
3 |
|
|
4 |
import ipaddress |
7✔ |
5 |
|
|
6 |
# pylint: skip-file
|
|
7 |
|
|
8 |
if sys.version_info[0] == 2: |
7✔ |
9 |
|
|
10 |
def compat_ip_address(address): |
2 only 375.1 and 375.6 ✔ |
11 |
"""Intended for internal use only."""
|
|
12 |
if isinstance(address, bytes): |
2 only 375.1 and 375.6 ✔ |
13 |
address = address.decode() |
2 only 375.1 and 375.6 ✔ |
14 |
return ipaddress.ip_address(address)
|
2 only 375.1 and 375.6 ✔ |
15 |
else:
|
|
16 |
|
|
17 |
def compat_ip_address(address): |
5 all except 375.1 and 375.6 ✔ |
18 |
"""Intended for internal use only."""
|
|
19 |
return ipaddress.ip_address(address)
|
5 all except 375.1 and 375.6 ✔ |