You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/04/09 15:51:23 UTC
svn commit: r1090595 - in /incubator/libcloud/trunk/libcloud/storage:
base.py drivers/cloudfiles.py
Author: tomaz
Date: Sat Apr 9 13:51:23 2011
New Revision: 1090595
URL: http://svn.apache.org/viewvc?rev=1090595&view=rev
Log:
Fix download_objecT_as_stream method in the CloudFiles driver.
Modified:
incubator/libcloud/trunk/libcloud/storage/base.py
incubator/libcloud/trunk/libcloud/storage/drivers/cloudfiles.py
Modified: incubator/libcloud/trunk/libcloud/storage/base.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/storage/base.py?rev=1090595&r1=1090594&r2=1090595&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/storage/base.py (original)
+++ incubator/libcloud/trunk/libcloud/storage/base.py Sat Apr 9 13:51:23 2011
@@ -390,7 +390,6 @@ class StorageDriver(object):
@return C{bool} True on success, False otherwise.
"""
success_status_code = success_status_code or httplib.OK
- callback_kwargs['response'] = response.response
if response.status == success_status_code:
return callback(**callback_kwargs)
Modified: incubator/libcloud/trunk/libcloud/storage/drivers/cloudfiles.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/storage/drivers/cloudfiles.py?rev=1090595&r1=1090594&r2=1090595&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/storage/drivers/cloudfiles.py (original)
+++ incubator/libcloud/trunk/libcloud/storage/drivers/cloudfiles.py Sat Apr 9 13:51:23 2011
@@ -251,6 +251,7 @@ class CloudFilesStorageDriver(StorageDri
return self._get_object(obj=obj, callback=self._save_object,
response=response,
callback_kwargs={'obj': obj,
+ 'response': response.response,
'destination_path': destination_path,
'overwrite_existing': overwrite_existing,
'delete_on_failure': delete_on_failure},
@@ -265,7 +266,8 @@ class CloudFilesStorageDriver(StorageDri
return self._get_object(obj=obj, callback=self._get_object_as_stream,
response=response,
- callback_kwargs={'chunk_size': chunk_size},
+ callback_kwargs={ 'iterator': response.response,
+ 'chunk_size': chunk_size},
success_status_code=httplib.OK)
def upload_object(self, file_path, container, object_name, extra=None,