summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/python/m5/SimObject.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/python/m5/SimObject.py b/src/python/m5/SimObject.py
index 9c6a32f41..a447d96db 100644
--- a/src/python/m5/SimObject.py
+++ b/src/python/m5/SimObject.py
@@ -993,9 +993,8 @@ class SimObject(object):
port_names.sort()
for port_name in port_names:
port = self._port_refs.get(port_name, None)
- if port != None:
- setattr(cc_params, 'port_' + port_name + '_connection_count',
- len(port))
+ setattr(cc_params, 'port_' + port_name + '_connection_count',
+ len(port) if port != None else 0)
self._ccParams = cc_params
return self._ccParams