Sorry about that. I didn't notice that it's only 2.6+ and none of
the machines I've got have older versions of python on them. 

Does this
fix it for you? 

diff -r aae12ce9f34c src/python/m5/simulate.py
---
a/src/python/m5/simulate.py Mon Jan 09 20:05:07 2012 -0500
+++
b/src/python/m5/simulate.py Mon Jan 09 23:23:54 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

Ali 

On 09.01.2012 23:10, nathan binkert wrote: 

>> Ali,
does python has a module named json by default? I received an import
error about json not being found.
> 
> Shoot. It's python 2.6. That
said, it's optional, so I still think
> we should keep it.
> 
> Nate
>
_______________________________________________
> gem5-dev mailing
list
> [email protected]
> http://m5sim.org/mailman/listinfo/gem5-dev

 
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to