From: Philipp Gesang Date: Thu, 10 Aug 2017 08:13:18 +0000 (+0200) Subject: fix misleading docstrings for index file hook X-Git-Tag: v2.2~7^2~89 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=2cc6e32b48e22e9a520b5adb8525be3466578258;p=python-delta-tar fix misleading docstrings for index file hook --- diff --git a/deltatar/deltatar.py b/deltatar/deltatar.py index ee5e41b..b247fdb 100644 --- a/deltatar/deltatar.py +++ b/deltatar/deltatar.py @@ -221,9 +221,9 @@ class DeltaTar(object): 'bz2' open with bzip2 compression - index_name_func: function that sets a custom name for the index file. - This function receives the backup_path and if it's a full backup as - arguments and must return the name of the corresponding index file. - Optional, DeltaTar gives index files a "backup.index" name by default. + This function receives a flag to indicate whether the name will be + used for a full or diff backup. The backup path will be prepended to + its return value. - volume_name_func: function that defines the name of tar volumes. It receives the backup_path, if it's a full backup and the volume number, @@ -293,10 +293,9 @@ class DeltaTar(object): def index_name_func(self, is_full): # pylint: disable=method-hidden ''' - function that sets a custom name for the index file. This function - receives the backup_path and if it's a full backup as arguments and must - return the name of the corresponding index file. Optional, DeltaTar gives - index files a name by default. + Callback for setting a custom name for the index file. Depending on + whether *is_full* is set, it will create a suitable name for a full + or a diff backup. ''' prefix = "bfull" if is_full else "bdiff" date_str = self.current_time.strftime("%Y-%m-%d-%H%M")