summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2011-07-11 19:57:10 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2011-07-11 19:57:10 -0500
commitd919930c3c7f5d364f211513742a51f56e36eaab (patch)
treec0f7852e8f5e5709d5240664bc8dfbadbbcdddbe /configs
parentdbde1502cd089ae4eb2fac032348a5524f199939 (diff)
downloadgem5-d919930c3c7f5d364f211513742a51f56e36eaab.tar.xz
se.py: Fixes the way ruby's options are added
Diffstat (limited to 'configs')
-rw-r--r--configs/example/se.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/configs/example/se.py b/configs/example/se.py
index be7d87bc6..6ed3de4f6 100644
--- a/configs/example/se.py
+++ b/configs/example/se.py
@@ -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("--output", default="", help="Redirect stdout to a file.")
parser.add_option("--errout", default="", help="Redirect stderr to a file.")
-parser.add_option("--ruby", action="store_true")
-execfile(os.path.join(config_root, "common", "Options.py"))
+if 'PROTOCOL' in buildEnv:
+ parser.add_option("--ruby", action="store_true")
-(options, args) = parser.parse_args()
+execfile(os.path.join(config_root, "common", "Options.py"))
-if options.ruby:
+if '--ruby' in sys.argv:
Ruby.define_options(parser)
- (options, args) = parser.parse_args()
+
+(options, args) = parser.parse_args()
if args:
print "Error: script doesn't take any positional arguments"