diff options
author | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-03-21 07:44:59 +0000 |
---|---|---|
committer | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-03-21 07:44:59 +0000 |
commit | 2476db8a9a219df57157866f6b95dc0dccf6c235 (patch) | |
tree | d4d2cd7a2513b4de28845a23243fb6f6c96e1ac2 | |
parent | f1f60691a3de44b5b90261e7a6b6e5b9ada25467 (diff) | |
download | rdiff-backup-2476db8a9a219df57157866f6b95dc0dccf6c235.tar.gz |
--remove-older-than and --list-increments now exit if too many arguments
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/branches/r0-6@9 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rwxr-xr-x | rdiff-backup/src/main.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rdiff-backup/src/main.py b/rdiff-backup/src/main.py index 24455f6..23b4503 100755 --- a/rdiff-backup/src/main.py +++ b/rdiff-backup/src/main.py @@ -124,8 +124,16 @@ class Main: elif self.action == "test-server": SetConnections.TestConnections() elif self.action == "list-increments": - self.ListIncrements(rps[0]) + if len(rps) > 1: + Log.FatalError("The --list-increments option should be used " + "with only one argument,\n" + "the mirror directory to process") + self.ListIncrements(rps[0]) elif self.action == "remove-older-than": + if len(rps) > 1: + Log.FatalError("The --remove-older-than option should be used " + "with only one directory argument,\n" + "the location of the mirror directory.") self.RemoveOlderThan(rps[0]) else: raise AssertionError("Unknown action " + self.action) |