changeset a1d5a0e2e970 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=a1d5a0e2e970
description:
Automated merge with ssh://repo.gem5.org/gem5
diffstat:
src/python/m5/simulate.py | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (30 lines):
diff -r a9476951e3a2 -r a1d5a0e2e970 src/python/m5/simulate.py
--- a/src/python/m5/simulate.py Tue Jan 10 10:15:02 2012 -0600
+++ b/src/python/m5/simulate.py Tue Jan 10 10:18:08 2012 -0600
@@ -31,7 +31,6 @@
import atexit
import os
import sys
-import json
# import the SWIG-wrapped main C++ functions
import internal
@@ -74,10 +73,14 @@
ini_file.close()
if options.json_config:
- json_file = file(os.path.join(options.outdir, options.json_config),
'w')
- d = root.get_config_as_dict()
- json.dump(d, json_file, indent=4)
- json_file.close()
+ try:
+ import json
+ json_file = file(os.path.join(options.outdir,
options.json_config), 'w')
+ d = root.get_config_as_dict()
+ json.dump(d, json_file, indent=4)
+ json_file.close()
+ except ImportError:
+ pass
# Initialize the global statistics
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev