Skip to content

Commit

Permalink
Also need to use bytes here.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/libcloud/trunk@1210244 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Kami committed Dec 4, 2011
1 parent 352b02f commit bc3b19d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libcloud/utils/files.py
Expand Up @@ -91,20 +91,20 @@ def exhaust_iterator(iterator):
@rtype C{str}
@return Data returned by the iterator.
"""
data = ''
data = b('')

try:
chunk = str(next(iterator))
chunk = b(next(iterator))
except StopIteration:
chunk = ''
chunk = b('')

while len(chunk) > 0:
data += chunk

try:
chunk = str(next(iterator))
chunk = b(next(iterator))
except StopIteration:
chunk = ''
chunk = b('')

return data

Expand Down

0 comments on commit bc3b19d

Please sign in to comment.