changeset bd48f4547e77 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=bd48f4547e77
description:
ruby: Improved try except blocks in ruby creation
Replaced the sys.exit in the try-except blocks with raise so that the
python
call stack will be printed
diffstat:
configs/ruby/Ruby.py | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (32 lines):
diff -r 5dc128cab5dc -r bd48f4547e77 configs/ruby/Ruby.py
--- a/configs/ruby/Ruby.py Fri Aug 20 11:46:13 2010 -0700
+++ b/configs/ruby/Ruby.py Fri Aug 20 11:46:13 2010 -0700
@@ -62,11 +62,11 @@
exec "import %s" % protocol
try:
(cpu_sequencers, dir_cntrls, all_cntrls) = \
- eval("%s.create_system(options, system, piobus, dma_devices)" \
- % protocol)
+ eval("%s.create_system(options, system, piobus, dma_devices)" \
+ % protocol)
except:
print "Error: could not create sytem for ruby protocol %s" % protocol
- sys.exit(1)
+ raise
#
# Important: the topology must be created before the network and after the
@@ -74,10 +74,11 @@
#
exec "import %s" % options.topology
try:
- net_topology = eval("%s.makeTopology(all_cntrls, options)" %
options.topology)
+ net_topology = eval("%s.makeTopology(all_cntrls, options)" \
+ % options.topology)
except:
print "Error: could not create topology %s" % options.topology
- sys.exit(1)
+ raise
if options.garnet_network == "fixed":
network = GarnetNetwork_d(topology = net_topology)
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev