Enforce that --source-dir can only be specified once
This commit is contained in:
parent
9d66f59113
commit
b979b6196f
@ -154,6 +154,8 @@ class MikesBackup:
|
|||||||
a = a + 1
|
a = a + 1
|
||||||
elif arg == "--source-dir":
|
elif arg == "--source-dir":
|
||||||
valid_arg = True
|
valid_arg = True
|
||||||
|
if self.__source_dir:
|
||||||
|
raise Exception("--source-dir can only be used once")
|
||||||
self.__source_dir = sys.argv[a + 1]
|
self.__source_dir = sys.argv[a + 1]
|
||||||
self.log("Found source dir: " + sys.argv[a + 1])
|
self.log("Found source dir: " + sys.argv[a + 1])
|
||||||
a = a + 1
|
a = a + 1
|
||||||
|
Loading…
Reference in New Issue
Block a user