diff options
Diffstat (limited to 'example.py')
-rwxr-xr-x | example.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -20,6 +20,7 @@ def list_targets(tgts): # parse the commandline parser = argparse.ArgumentParser() parser.add_argument('-l', '--list-targets', action = 'store_true') +parser.add_argument('-n', '--dry-run', action = 'store_true') parser.add_argument('targets', nargs = argparse.REMAINDER) args = parser.parse_args() @@ -41,7 +42,7 @@ else: tgts_run = tgts repo = Repo() -res = repo.backup(tgts_run) +res = repo.backup(tgts_run, dry_run = args.dry_run) for tgt, tgt_res in res.target_results.items(): if tgt_res.success: continue |