Cnf = utils.get_conf()
- Arguments = [('h',"help","Edit-Transitions::Options::Help"),
+ Arguments = [('a',"automatic","Edit-Transitions::Options::Automatic"),
+ ('h',"help","Edit-Transitions::Options::Help"),
('e',"edit","Edit-Transitions::Options::Edit"),
('i',"import","Edit-Transitions::Options::Import", "HasArg"),
('c',"check","Edit-Transitions::Options::Check"),
('s',"sudo","Edit-Transitions::Options::Sudo"),
('n',"no-action","Edit-Transitions::Options::No-Action")]
- for i in ["help", "no-action", "edit", "import", "check", "sudo"]:
+ for i in ["automatic", "help", "no-action", "edit", "import", "check", "sudo"]:
if not Cnf.has_key("Edit-Transitions::Options::%s" % (i)):
Cnf["Edit-Transitions::Options::%s" % (i)] = ""
-i, --import <file> check and import transitions from file
-c, --check check the transitions file, remove outdated entries
-S, --sudo use sudo to update transitions file
+ -a, --automatic don't prompt (only affects check).
-n, --no-action don't do anything (only affects check)"""
sys.exit(exit_code)
def check_transitions(transitions):
"""
Check if the defined transitions still apply and remove those that no longer do.
- @note: Asks the user for confirmation first.
+ @note: Asks the user for confirmation first unless -a has been set.
"""
to_dump = 0
if Options["no-action"]:
answer="n"
+ elif Options["automatic"]:
+ answer="y"
else:
answer = utils.our_raw_input(prompt).lower()