diff makeitso/cli.py @ 61:57f9b0349192

wait, its completely silly to print the variables since OptionParser already does that
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 06 Jan 2011 17:14:22 -0800
parents da0d8c5c5157
children 30100690ad3f
line wrap: on
line diff
--- 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)