mirror of https://github.com/python/cpython.git
small fixes
This commit is contained in:
parent
951213e8ca
commit
ee3de2a8b5
|
@ -376,7 +376,7 @@ def __init__(self, bcastaddr, prog, vers, port):
|
|||
|
||||
def connsocket(self):
|
||||
# Don't connect -- use sendto
|
||||
self.sock.allowbroadcast(1)
|
||||
self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
|
||||
|
||||
def set_reply_handler(self, reply_handler):
|
||||
self.reply_handler = reply_handler
|
||||
|
|
|
@ -69,7 +69,7 @@ def pack_string(self, s):
|
|||
self.pack_uint(n)
|
||||
self.pack_fstring(n, s)
|
||||
|
||||
pack_opaque = pack_string
|
||||
pack_opaque = pack_fopaque
|
||||
|
||||
def pack_list(self, list, pack_item):
|
||||
for item in list:
|
||||
|
@ -86,7 +86,7 @@ def pack_farray(self, n, list, pack_item):
|
|||
def pack_array(self, list, pack_item):
|
||||
n = len(list)
|
||||
self.pack_uint(n)
|
||||
self.pack_farray(n, list)
|
||||
self.pack_farray(n, list, pack_item)
|
||||
|
||||
|
||||
class Unpacker:
|
||||
|
@ -176,7 +176,7 @@ def unpack_string(self):
|
|||
n = self.unpack_uint()
|
||||
return self.unpack_fstring(n)
|
||||
|
||||
unpack_opaque = unpack_string
|
||||
unpack_opaque = unpack_fopaque
|
||||
|
||||
def unpack_list(self, unpack_item):
|
||||
list = []
|
||||
|
|
Loading…
Reference in New Issue