diff options
author | Joar Wandborg <git@wandborg.com> | 2011-09-01 17:50:13 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-09-01 17:50:13 -0500 |
commit | bf821aef560c7aff83c4d2a16324e20f608c6dfa (patch) | |
tree | a96607f3746f05e871aea07ea4c15dcb9626105a | |
parent | ce5db609f9771e9cc115e3784d5328798e1b257a (diff) | |
download | mediagoblin-bf821aef560c7aff83c4d2a16324e20f608c6dfa.tar.lz mediagoblin-bf821aef560c7aff83c4d2a16324e20f608c6dfa.tar.xz mediagoblin-bf821aef560c7aff83c4d2a16324e20f608c6dfa.zip |
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.
-rw-r--r-- | mediagoblin/storage.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/storage.py b/mediagoblin/storage.py index 39c9eafc..6a44850c 100644 --- a/mediagoblin/storage.py +++ b/mediagoblin/storage.py @@ -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): |