Skip to content
This repository was archived by the owner on Jun 24, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions poster/streaminghttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ def send(self, value):
# NOTE: we DO propagate the error, though, because we cannot simply
# ignore the error... the caller will know if they can retry.
if self.debuglevel > 0:
print "send:", repr(value)
print ("send:", repr(value))
try:
blocksize = 8192
if hasattr(value, 'read') :
if self.debuglevel > 0:
print "sendIng a read()able"
print ("sendIng a read()able")
data = value.read(blocksize)
while data:
self.sock.sendall(data)
data = value.read(blocksize)
elif hasattr(value, 'next'):
if self.debuglevel > 0:
print "sendIng an iterable"
print ("sendIng an iterable")
for data in value:
self.sock.sendall(data)
else:
Expand Down