From 68ffb13690fa0c364c514ce253364f928e50841c Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sat, 11 Jun 2011 21:23:32 -0500 Subject: possibly_localize_file->localized_file... a bit less terribly long. --- mediagoblin/workbench.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'mediagoblin/workbench.py') diff --git a/mediagoblin/workbench.py b/mediagoblin/workbench.py index 360e3e19..d7252623 100644 --- a/mediagoblin/workbench.py +++ b/mediagoblin/workbench.py @@ -70,9 +70,9 @@ class WorkbenchManager(object): shutil.rmtree(workbench) - def possibly_localize_file(self, workbench, storage, filepath, - filename_if_copying=None, - keep_extension_if_copying=True): + def localized_file(self, workbench, storage, filepath, + filename_if_copying=None, + keep_extension_if_copying=True): """ Possibly localize the file from this storage system (for read-only purposes, modifications should be written to a new file.). @@ -93,22 +93,22 @@ class WorkbenchManager(object): localized_filename Examples: - >>> wb_manager.possibly_localize_file( + >>> wb_manager.localized_file( ... '/our/workbench/subdir', local_storage, ... ['path', 'to', 'foobar.jpg']) u'/local/storage/path/to/foobar.jpg' - >>> wb_manager.possibly_localize_file( + >>> wb_manager.localized_file( ... '/our/workbench/subdir', remote_storage, ... ['path', 'to', 'foobar.jpg']) '/our/workbench/subdir/foobar.jpg' - >>> wb_manager.possibly_localize_file( + >>> wb_manager.localized_file( ... '/our/workbench/subdir', remote_storage, ... ['path', 'to', 'foobar.jpg'], 'source.jpeg', False) '/our/workbench/subdir/foobar.jpeg' - >>> wb_manager.possibly_localize_file( + >>> wb_manager.localized_file( ... '/our/workbench/subdir', remote_storage, ... ['path', 'to', 'foobar.jpg'], 'source', True) '/our/workbench/subdir/foobar.jpg' -- cgit v1.2.3