Show More
@@ -547,13 +547,14 b' def safesend(self, str):' | |||||
547 | print "send:", repr(str) |
|
547 | print "send:", repr(str) | |
548 | try: |
|
548 | try: | |
549 | blocksize = 8192 |
|
549 | blocksize = 8192 | |
550 |
|
|
550 | read = getattr(str, 'read', None) | |
|
551 | if read is not None: | |||
551 | if self.debuglevel > 0: |
|
552 | if self.debuglevel > 0: | |
552 | print "sendIng a read()able" |
|
553 | print "sendIng a read()able" | |
553 |
data = |
|
554 | data = read(blocksize) | |
554 | while data: |
|
555 | while data: | |
555 | self.sock.sendall(data) |
|
556 | self.sock.sendall(data) | |
556 |
data = |
|
557 | data = read(blocksize) | |
557 | else: |
|
558 | else: | |
558 | self.sock.sendall(str) |
|
559 | self.sock.sendall(str) | |
559 | except socket.error, v: |
|
560 | except socket.error, v: |
General Comments 0
You need to be logged in to leave comments.
Login now