From: Philipp Gesang Date: Fri, 31 Mar 2017 13:35:53 +0000 (+0200) Subject: actually output something in toc mode X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=eab51cc10cb73d179645e2b6fb70b57813d87c75;p=python-delta-tar actually output something in toc mode 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. --- diff --git a/backup.py b/backup.py index 7a7e7dc..aa84348 100644 --- 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)