summaryrefslogtreecommitdiff
path: root/django/core/files/move.py
diff options
context:
space:
mode:
authorAnton Samarchyan <anton.samarchyan@savoirfairelinux.com>2017-01-25 14:02:33 -0500
committerTim Graham <timograham@gmail.com>2017-02-21 11:58:42 -0500
commit5a6f70b4281817656db2f36c5919036d38fcce7f (patch)
tree0fa649e905d960b54c5a65d80be23e42f900c23d /django/core/files/move.py
parent3eb679a86956d9eedf24492f0002de002f7180f5 (diff)
downloaddjango-5a6f70b4281817656db2f36c5919036d38fcce7f.tar.gz
Refs #27656 -- Updated django.core docstring verbs according to PEP 257.
Diffstat (limited to 'django/core/files/move.py')
-rw-r--r--django/core/files/move.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/django/core/files/move.py b/django/core/files/move.py
index 9e6cfe7684..23491d6573 100644
--- a/django/core/files/move.py
+++ b/django/core/files/move.py
@@ -28,15 +28,14 @@ def _samefile(src, dst):
def file_move_safe(old_file_name, new_file_name, chunk_size=1024 * 64, allow_overwrite=False):
"""
- Moves a file from one location to another in the safest way possible.
+ Move a file from one location to another in the safest way possible.
- First, tries ``os.rename``, which is simple but will break across filesystems.
- If that fails, streams manually from one file to another in pure Python.
+ First, try ``os.rename``, which is simple but will break across filesystems.
+ If that fails, stream manually from one file to another in pure Python.
- If the destination file exists and ``allow_overwrite`` is ``False``, this
- function will throw an ``IOError``.
+ If the destination file exists and ``allow_overwrite`` is ``False``, raise
+ ``IOError``.
"""
-
# There's no reason to move if we don't have to.
if _samefile(old_file_name, new_file_name):
return