changeset 59006a759508 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=59006a759508
description:
python: pull out common code from main that processes arguments
diffstat:
1 file changed, 9 insertions(+), 18 deletions(-)
src/python/m5/main.py | 27 +++++++++------------------
diffs (51 lines):
diff -r b514de04c311 -r 59006a759508 src/python/m5/main.py
--- a/src/python/m5/main.py Mon May 11 11:18:09 2009 -0700
+++ b/src/python/m5/main.py Mon May 11 11:18:09 2009 -0700
@@ -121,6 +121,15 @@
add_option("--list-sim-objects", action='store_true', default=False,
help="List all built-in SimObjects, their parameters and default values")
+# load the options.py config file to allow people to set their own
+# default options
+options_file = config.get('options.py')
+if options_file:
+ scope = { 'options' : options }
+ execfile(options_file, scope)
+
+arguments = options.parse_args()
+
def main():
import core
import debug
@@ -136,15 +145,6 @@
fatal("Tracing is not enabled. Compile with TRACING_ON")
- # load the options.py config file to allow people to set their own
- # default options
- options_file = config.get('options.py')
- if options_file:
- scope = { 'options' : options }
- execfile(options_file, scope)
-
- arguments = options.parse_args()
-
if not os.path.isdir(options.outdir):
os.makedirs(options.outdir)
@@ -366,15 +366,6 @@
if __name__ == '__main__':
from pprint import pprint
- # load the options.py config file to allow people to set their own
- # default options
- options_file = config.get('options.py')
- if options_file:
- scope = { 'options' : options }
- execfile(options_file, scope)
-
- arguments = options.parse_args()
-
print 'opts:'
pprint(options, indent=4)
print
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev