Author: tomaz
Date: Sun Dec 4 21:55:40 2011
New Revision: 1210244
URL: http://svn.apache.org/viewvc?rev=1210244&view=rev
Log:
Also need to use bytes here.
Modified:
libcloud/trunk/libcloud/utils/files.py
Modified: libcloud/trunk/libcloud/utils/files.py
URL:
http://svn.apache.org/viewvc/libcloud/trunk/libcloud/utils/files.py?rev=1210244&r1=1210243&r2=1210244&view=diff
==============================================================================
--- libcloud/trunk/libcloud/utils/files.py (original)
+++ libcloud/trunk/libcloud/utils/files.py Sun Dec 4 21:55:40 2011
@@ -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