diff options
author | Bastian Bloessl <bloessl@ccs-labs.org> | 2013-11-27 18:29:19 +0100 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2013-11-29 12:37:12 +0100 |
commit | e57ebc85082e5d8c168e06394de55c478cfe9b5c (patch) | |
tree | 4bba130675e1a7ec1f72bef3ad0a05725d740cf2 /grc/python/Port.py | |
parent | ffbb9dd478b8a6053b8039618ccfaaa7b56099cf (diff) |
grc: check if stream port before overwriting key and set _key, not 'key' in dict
Diffstat (limited to 'grc/python/Port.py')
-rw-r--r-- | grc/python/Port.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/grc/python/Port.py b/grc/python/Port.py index ef60b33839..056be97e72 100644 --- a/grc/python/Port.py +++ b/grc/python/Port.py @@ -235,7 +235,7 @@ class Port(_Port, _GUIPort): if not self._clones: # add index to master port name self._name = self._n['name'] + '0' if not self._key.isdigit(): - self._n['key'] = self._name + self._key = self._name # Prepare a copy of the odict for the clone n = self._n.copy() @@ -254,4 +254,6 @@ class Port(_Port, _GUIPort): """ self._clones.remove(port) if not self._clones: - self._name = self._n['key'] = self._n['name'] + self._name = self._n['name'] + if not self._key.isdigit(): + self._key = self._name |