summaryrefslogtreecommitdiff
path: root/src/python/m5/simulate.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/m5/simulate.py')
-rw-r--r--src/python/m5/simulate.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py
index 6c70d8fbd..3d91da368 100644
--- a/src/python/m5/simulate.py
+++ b/src/python/m5/simulate.py
@@ -45,11 +45,10 @@ def instantiate(root):
ticks.fixGlobalFrequency()
root.unproxy_all()
- # ugly temporary hack to get output to config.ini
- sys.stdout = file(os.path.join(options.outdir, 'config.ini'), 'w')
- root.print_ini()
- sys.stdout.close() # close config.ini
- sys.stdout = sys.__stdout__ # restore to original
+
+ ini_file = file(os.path.join(options.outdir, 'config.ini'), 'w')
+ root.print_ini(ini_file)
+ ini_file.close() # close config.ini
# Initialize the global statistics
internal.stats.initSimStats()