socket: Native struct sockaddr may come as bytes or bytearray.

pull/48/head
Paul Sokolovsky 2015-10-19 10:11:00 +03:00
rodzic 89480056ed
commit 8bb6857818
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -8,7 +8,7 @@ IP_ADD_MEMBERSHIP = 35
IP_DROP_MEMBERSHIP = 36
def _resolve_addr(addr):
if isinstance(addr, bytes):
if isinstance(addr, (bytes, bytearray)):
return addr
if len(addr) != 2:
raise NotImplementedError("Only IPv4 supported")