From 2cc6e32b48e22e9a520b5adb8525be3466578258 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Thu, 10 Aug 2017 10:13:18 +0200 Subject: [PATCH] fix misleading docstrings for index file hook --- deltatar/deltatar.py | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) 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") -- 1.7.1