actually output something in toc mode
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Fri, 31 Mar 2017 13:35:53 +0000 (15:35 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:08 +0000 (13:34 +0200)
Until now backup.py wouldn’t print anything when passed the -l
flag. Supply a trivial printer to the “list_func” argument to
output the contents similar to what GNU tar does.

backup.py

index 7a7e7dc..aa84348 100644 (file)
--- a/backup.py
+++ b/backup.py
@@ -134,7 +134,7 @@ if __name__ == "__main__":
     elif args.diff:
         deltatar.create_diff_backup(args.sourcepath, args.targetpath, args.indexes[0], args.volsize)
     elif args.list_files:
-        deltatar.list_backup(args.sourcepath)
+        deltatar.list_backup(args.sourcepath, lambda e: print (e.name))
     elif args.restore:
         if args.indexes is not None:
             deltatar.restore_backup(args.targetpath, backup_indexes_paths=args.indexes)