(x)
| 753 | |
| 754 | |
| 755 | def atol(x): |
| 756 | # type: (str) -> int |
| 757 | try: |
| 758 | ip = inet_aton(x) |
| 759 | except socket.error: |
| 760 | raise ValueError("Bad IP format: %s" % x) |
| 761 | return cast(int, struct.unpack("!I", ip)[0]) |
| 762 | |
| 763 | |
| 764 | def valid_ip(addr): |
no test coverage detected