Bug #532 - CloudFiles StorageObjectWrapper AttributeError - Fix + More
Additionally: Extended get_file to accept both *args and **kwargs and to pass that further down the line to StorageObjectWrapper. Might be useful in the future.
This commit is contained in:
parent
ce5db609f9
commit
bf821aef56
@ -274,7 +274,7 @@ class CloudFilesStorage(StorageInterface):
|
||||
except cloudfiles.errors.NoSuchObject:
|
||||
return False
|
||||
|
||||
def get_file(self, filepath, *args):
|
||||
def get_file(self, filepath, *args, **kwargs):
|
||||
"""
|
||||
- Doesn't care about the "mode" argument
|
||||
"""
|
||||
@ -291,7 +291,7 @@ class CloudFilesStorage(StorageInterface):
|
||||
if mimetype:
|
||||
obj.content_type = mimetype[0]
|
||||
|
||||
return self.StorageObjectWrapper(obj)
|
||||
return StorageObjectWrapper(obj, *args, **kwargs)
|
||||
|
||||
def delete_file(self, filepath):
|
||||
# TODO: Also delete unused directories if empty (safely, with
|
||||
@ -315,7 +315,7 @@ class StorageObjectWrapper():
|
||||
This wrapper currently meets mediagoblin's needs for a public_store
|
||||
file-like object.
|
||||
"""
|
||||
def __init__(self, storage_object):
|
||||
def __init__(self, storage_object, *args, **kwargs):
|
||||
self.storage_object = storage_object
|
||||
|
||||
def read(self, *args, **kwargs):
|
||||
|
Loading…
x
Reference in New Issue
Block a user