diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2014-06-07 13:51:42 +0300 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2014-06-07 13:51:42 +0300 |
commit | d9aced73f16b37eb24b24778f8f448769f1a7665 (patch) | |
tree | 9bf7657a972284cf1705758a6b168113657053ec /mediagoblin/storage/cloudfiles.py | |
parent | 120fa4ae95329007c529b310f4e950146d44159f (diff) | |
download | mediagoblin-d9aced73f16b37eb24b24778f8f448769f1a7665.tar.lz mediagoblin-d9aced73f16b37eb24b24778f8f448769f1a7665.tar.xz mediagoblin-d9aced73f16b37eb24b24778f8f448769f1a7665.zip |
The file() builtin has been removed in Python 3. Use open() instead.
Diffstat (limited to 'mediagoblin/storage/cloudfiles.py')
-rw-r--r-- | mediagoblin/storage/cloudfiles.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/storage/cloudfiles.py b/mediagoblin/storage/cloudfiles.py index 47c81ad6..532e5bac 100644 --- a/mediagoblin/storage/cloudfiles.py +++ b/mediagoblin/storage/cloudfiles.py @@ -143,7 +143,7 @@ class CloudFilesStorage(StorageInterface): """ # Override this method, using the "stream" iterator for efficient streaming with self.get_file(filepath, 'rb') as source_file: - with file(dest_path, 'wb') as dest_file: + with open(dest_path, 'wb') as dest_file: for data in source_file: dest_file.write(data) @@ -164,7 +164,7 @@ class CloudFilesStorage(StorageInterface): # TODO: Fixing write() still seems worthwhile though. _log.debug('Sending {0} to cloudfiles...'.format(filepath)) with self.get_file(filepath, 'wb') as dest_file: - with file(filename, 'rb') as source_file: + with open(filename, 'rb') as source_file: # Copy to storage system in 4096 byte chunks dest_file.send(source_file) |