Add comments about the callback param to the docs
authorSamir Aguiar <samir.aguiar@intra2net.com>
Wed, 22 Apr 2015 10:52:42 +0000 (12:52 +0200)
committerSamir Aguiar <samir.aguiar@intra2net.com>
Wed, 22 Apr 2015 10:52:42 +0000 (12:52 +0200)
Also, some others cosmetic changes.

deltatar/deltatar.py
docs/design.py

index 8d1df90..08bd597 100644 (file)
@@ -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']
 
index 3cd0e7e..070bfef 100644 (file)
@@ -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.