Replace use of apply() with extended call syntax.
This commit is contained in:
parent
a2c2595024
commit
f32e459125
|
@ -319,6 +319,7 @@ class dispatcher:
|
||||||
raise socket.error, err
|
raise socket.error, err
|
||||||
|
|
||||||
def accept (self):
|
def accept (self):
|
||||||
|
# XXX can return either an address pair or None
|
||||||
try:
|
try:
|
||||||
conn, addr = self.socket.accept()
|
conn, addr = self.socket.accept()
|
||||||
return conn, addr
|
return conn, addr
|
||||||
|
@ -521,10 +522,10 @@ if os.name == 'posix':
|
||||||
self.fd = fd
|
self.fd = fd
|
||||||
|
|
||||||
def recv (self, *args):
|
def recv (self, *args):
|
||||||
return apply (os.read, (self.fd,)+args)
|
return os.read(self.fd, *args)
|
||||||
|
|
||||||
def send (self, *args):
|
def send (self, *args):
|
||||||
return apply (os.write, (self.fd,)+args)
|
return os.write(self.fd, *args)
|
||||||
|
|
||||||
read = recv
|
read = recv
|
||||||
write = send
|
write = send
|
||||||
|
|
Loading…
Reference in New Issue