travis-ci
9 of 9 new or added lines in 1 file covered. (100.0%)
280 of 283 relevant lines covered (98.94%)
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 382.6 and 382.1 ✔ |
11 |
"""Intended for internal use only."""
|
|
12 |
if isinstance(address, bytes): |
2 only 382.6 and 382.1 ✔ |
13 |
address = address.decode() |
2 only 382.6 and 382.1 ✔ |
14 |
return ipaddress.ip_address(address)
|
2 only 382.6 and 382.1 ✔ |
15 |
else:
|
|
16 |
|
|
17 |
def compat_ip_address(address): |
5 all except 382.6 and 382.1 ✔ |
18 |
"""Intended for internal use only."""
|
|
19 |
return ipaddress.ip_address(address)
|
5 all except 382.6 and 382.1 ✔ |