summaryrefslogtreecommitdiff
path: root/example.py
diff options
context:
space:
mode:
Diffstat (limited to 'example.py')
-rwxr-xr-xexample.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/example.py b/example.py
index 1643a17..62e237f 100755
--- a/example.py
+++ b/example.py
@@ -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