# HG changeset patch # User Jeff Hammel # Date 1294362862 28800 # Node ID 57f9b0349192ae712e006a87ea1a00b1da45fecb # Parent da0d8c5c5157a6caa05bc427b8c134bda770ca98 wait, its completely silly to print the variables since OptionParser already does that diff -r da0d8c5c5157 -r 57f9b0349192 makeitso/cli.py --- a/makeitso/cli.py Thu Jan 06 17:12:36 2011 -0800 +++ b/makeitso/cli.py Thu Jan 06 17:14:22 2011 -0800 @@ -23,33 +23,15 @@ parser.add_option('--%s' % variable.name, dest=variable.name, default=variable.default, help=variable.description) - - # add CLI-specific options - # should start with '_' to indicate reserved - parser.add_option('--variables', dest='_print_variables', - action='store_true', default=False, - help="display variables in the template") return parser def parse(self): parser = self.parser() options, args = parser.parse_args() - # print the variables for the templates - if options._print_variables: - - # find all variables - template = self.template() - variables = template.variables() - - # print them - for variable in sorted(variables): - print variable - return - # ensure output is given if len(args) != 1: - parser.error("Please specify one output") + parser.error("Please specify a single output destination") # template variables variables = dict([(key, value)