fileutils.AtomicSaver: last docstring tweak of the night

This commit is contained in:
Mahmoud Hashemi 2015-10-01 04:04:44 -07:00
parent 2d34fbfc1c
commit c302e86ecf
1 changed files with 6 additions and 6 deletions

View File

@ -245,29 +245,29 @@ class AtomicSaver(object):
Args: Args:
dest_path (str): The path where the completed file will be dest_path (str): The path where the completed file will be
written. written.
overwrite (bool): Whether to overwrite the destination file if
it exists at completion time. Defaults to ``True``.
dest_perms (int): Integer representation of file permissions dest_perms (int): Integer representation of file permissions
of the destination file. Defaults are, when overwriting, of the destination file. Defaults are, when overwriting,
to carry over permissions from the previous file, or if to carry over permissions from the previous file, or if
the file did not exist, default to read-write permissions, the file did not exist, default to read-write permissions,
respecting the user's configured `umask`_, usually respecting the user's configured `umask`_, usually
resulting in octal 644 or 664. resulting in octal 644 or 664.
overwrite (bool): Whether to overwrite the destination file if
it exists at completion time. Defaults to ``True``.
part_file (str): Name of the temporary *part_file*. Defaults part_file (str): Name of the temporary *part_file*. Defaults
to *dest_path* + ``.part``. Note that this argument is to *dest_path* + ``.part``. Note that this argument is
just the filename, and not the full path of the part just the filename, and not the full path of the part
file. Part files are always created in the same directory file. Part files are always created in the same directory
as the destination path. Otherwise, saving may not be atomic. as the destination path. Otherwise, saving may not be atomic.
part_perms (int): Integer representation of file permissions
of the short-lived part file. Defaults to owner read/write
(octal 600). Explicitly pass ``None`` to use `umask`_ as in
*dest_perms*.
overwrite_part (bool): Whether to overwrite the *part_file*, overwrite_part (bool): Whether to overwrite the *part_file*,
should it exist at setup time. Defaults to ``False``, should it exist at setup time. Defaults to ``False``,
which results in an :exc:`OSError` being raised on which results in an :exc:`OSError` being raised on
pre-existing part files. Be careful of setting this to pre-existing part files. Be careful of setting this to
``True`` in situations when multiple threads or processes ``True`` in situations when multiple threads or processes
could be writing to the same part file. could be writing to the same part file.
part_perms (int): Integer representation of file permissions
of the short-lived part file. Defaults to owner read/write
(octal 600). Explicitly pass ``None`` to use `umask`_ as in
*dest_perms*.
rm_part_on_exc (bool): Remove *part_file* on exception cases. rm_part_on_exc (bool): Remove *part_file* on exception cases.
Defaults to ``True``, but ``False`` can be useful for Defaults to ``True``, but ``False`` can be useful for
recovery in some cases. Note that resumption is not recovery in some cases. Note that resumption is not