se.py: Fixes the way ruby's options are added

This commit is contained in:
Nilay Vaish 2011-07-11 19:57:10 -05:00
parent dbde1502cd
commit d919930c3c

View file

@ -70,15 +70,16 @@ parser.add_option("-o", "--options", default="",
parser.add_option("-i", "--input", default="", help="Read stdin from a file.") parser.add_option("-i", "--input", default="", help="Read stdin from a file.")
parser.add_option("--output", default="", help="Redirect stdout to a file.") parser.add_option("--output", default="", help="Redirect stdout to a file.")
parser.add_option("--errout", default="", help="Redirect stderr to a file.") parser.add_option("--errout", default="", help="Redirect stderr to a file.")
parser.add_option("--ruby", action="store_true")
if 'PROTOCOL' in buildEnv:
parser.add_option("--ruby", action="store_true")
execfile(os.path.join(config_root, "common", "Options.py")) execfile(os.path.join(config_root, "common", "Options.py"))
(options, args) = parser.parse_args() if '--ruby' in sys.argv:
if options.ruby:
Ruby.define_options(parser) Ruby.define_options(parser)
(options, args) = parser.parse_args()
(options, args) = parser.parse_args()
if args: if args:
print "Error: script doesn't take any positional arguments" print "Error: script doesn't take any positional arguments"