summaryrefslogtreecommitdiff
path: root/grc/python/Port.py
diff options
context:
space:
mode:
authorBastian Bloessl <bloessl@ccs-labs.org>2013-11-27 08:00:09 +0100
committerSebastian Koslowski <koslowski@kit.edu>2013-11-29 12:37:12 +0100
commit3b9dcad23430493e6e43deac76d31cec0d797f47 (patch)
treeb8287bd67e1d136c1f9496f7240c63257d446c45 /grc/python/Port.py
parentac2babe9d2a7992f5fcfc97d8606329e76c1666e (diff)
grc: make statement more explicit
Diffstat (limited to 'grc/python/Port.py')
-rw-r--r--grc/python/Port.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/grc/python/Port.py b/grc/python/Port.py
index f664204e85..0b97f69cb5 100644
--- a/grc/python/Port.py
+++ b/grc/python/Port.py
@@ -184,9 +184,9 @@ class Port(_Port, _GUIPort):
Returns:
the number of ports or 1
"""
+ if self._nports == '': return ''
+
nports = self.get_parent().resolve_dependencies(self._nports)
- if not nports: # return blank if nports is blank
- return ''
try:
return max(1, int(self.get_parent().get_parent().evaluate(nports)))
except: