From b0aef801e348af8206f779e6031b9ed367484e7e Mon Sep 17 00:00:00 2001 From: Samir Aguiar Date: Wed, 22 Apr 2015 12:52:42 +0200 Subject: [PATCH] Add comments about the callback param to the docs Also, some others cosmetic changes. --- deltatar/deltatar.py | 4 ++-- docs/design.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/deltatar/deltatar.py b/deltatar/deltatar.py index 8d1df90..08bd597 100644 --- a/deltatar/deltatar.py +++ b/deltatar/deltatar.py @@ -1197,7 +1197,7 @@ class DeltaTar(object): using any file index. If it's a multivol tarfile, volume_name_func will be called. - restore_callback: callback function to be called during restore. - This is passed to the helper and gets called for every file + This is passed to the helper and gets called for every file. NOTE: If you want to use an index to restore a backup, this function only supports to do so when the tarfile mode is either uncompressed or @@ -1461,7 +1461,7 @@ class RestoreHelper(object): ''' Restore the path from the appropiate backup. Receives the current path from the first index iterator. itpath must be not null. - callback is a custom function that gets called for every file + callback is a custom function that gets called for every file. ''' path = itpath['path'] diff --git a/docs/design.py b/docs/design.py index 3cd0e7e..070bfef 100644 --- a/docs/design.py +++ b/docs/design.py @@ -124,11 +124,13 @@ class DeltaTar(object): which files changed since then. - max_volume_size: maximum volume size in megabytes (MB). Used to split the backup in volumes. Optional (won't split in volumes by default). + - restore_callback: callback function to be called during restore. + This is passed to the helper and gets called for every file. ''' pass def restore_backup(self, target_path, backup_indexes_paths=[], - backup_tar_path=None): + backup_tar_path=None, restore_callback=None): ''' Restores a backup. -- 1.7.1