From d9aced73f16b37eb24b24778f8f448769f1a7665 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Sat, 7 Jun 2014 13:51:42 +0300 Subject: The file() builtin has been removed in Python 3. Use open() instead. --- mediagoblin/storage/cloudfiles.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mediagoblin/storage/cloudfiles.py') 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) -- cgit v1.2.3