Skip to content

Commit

Permalink
call write() is send() is called with a string
Browse files Browse the repository at this point in the history
  • Loading branch information
Djoume Salvetti committed Nov 9, 2011
1 parent 1875be3 commit c67ee92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloudfiles/storage_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ def send(self, iterable):
self._name_check()

if isinstance(iterable, basestring):
# buffer it so that we don't send it 1 byte at a time.
iterable = StringIO.StringIO(iterable)
# use write to buffer the string and avoid sending it 1 byte at a time
self.write(iterable)

if hasattr(iterable, 'read'):

Expand Down

0 comments on commit c67ee92

Please sign in to comment.