changeset 266db8ff9ae8 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=266db8ff9ae8
description:
misc: Proper type check and import for PortRef
Rewriting the type checking around PortRef, which was interacting
strangely
with other Python scripts.
Tested-by: [email protected]
diffstat:
src/python/m5/util/dot_writer.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (20 lines):
diff -r e639ff917d2e -r 266db8ff9ae8 src/python/m5/util/dot_writer.py
--- a/src/python/m5/util/dot_writer.py Tue Apr 01 14:22:06 2014 -0500
+++ b/src/python/m5/util/dot_writer.py Wed Apr 23 05:18:25 2014 -0400
@@ -58,6 +58,7 @@
import m5, os, re
from m5.SimObject import isRoot, isSimObjectVector
+from m5.params import PortRef
from m5.util import warn
try:
import pydot
@@ -106,7 +107,7 @@
full_port_name = full_path + "_" + port_name
port_node = dot_create_node(simNode, full_port_name, port_name)
# create edges
- if type(port) is m5.params.PortRef:
+ if isinstance(port, PortRef):
dot_add_edge(simNode, callgraph, full_port_name, port)
else:
for p in port.elements:
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev