commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 01/01: grc: no block alias param for Option


From: git
Subject: [Commit-gnuradio] [gnuradio] 01/01: grc: no block alias param for Options blocks
Date: Wed, 23 Sep 2015 14:51:35 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch maint
in repository gnuradio.

commit 649cf8c2f2280aa020287731ee3fdd2ce2454d4a
Author: Sebastian Koslowski <address@hidden>
Date:   Tue Sep 22 16:54:49 2015 +0200

    grc: no block alias param for Options blocks
---
 grc/base/Block.py | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/grc/base/Block.py b/grc/base/Block.py
index 2a20c22..b7918d1 100644
--- a/grc/base/Block.py
+++ b/grc/base/Block.py
@@ -149,17 +149,15 @@ class Block(Element):
         # indistinguishable from normal GR blocks. Make explicit
         # checks for them here since they have no work function or
         # buffers to manage.
-        is_not_virtual_or_pad = ((self._key != "virtual_source") \
-                                     and (self._key != "virtual_sink") \
-                                     and (self._key != "pad_source") \
-                                     and (self._key != "pad_sink"))
+        is_virtual_or_pad = self._key in (
+            "virtual_source", "virtual_sink", "pad_source", "pad_sink")
         is_variable = self._key.startswith('variable')
 
         # Disable blocks that are virtual/pads or variables
-        if not is_not_virtual_or_pad or is_variable:
+        if is_virtual_or_pad or is_variable:
             self._flags += BLOCK_FLAG_DISABLE_BYPASS
 
-        if is_not_virtual_or_pad and not is_variable:
+        if not (is_virtual_or_pad or is_variable or self._key == 'options'):
             self.get_params().append(self.get_parent().get_parent().Param(
                 block=self,
                 n=odict({'name': 'Block Alias',
@@ -170,7 +168,7 @@ class Block(Element):
                      })
             ))
 
-        if (len(sources) or len(sinks)) and is_not_virtual_or_pad:
+        if (len(sources) or len(sinks)) and not is_virtual_or_pad:
             self.get_params().append(self.get_parent().get_parent().Param(
                     block=self,
                     n=odict({'name': 'Core Affinity',
@@ -180,7 +178,7 @@ class Block(Element):
                              'tab': ADVANCED_PARAM_TAB
                              })
                     ))
-        if len(sources) and is_not_virtual_or_pad:
+        if len(sources) and not is_virtual_or_pad:
             self.get_params().append(self.get_parent().get_parent().Param(
                     block=self,
                     n=odict({'name': 'Min Output Buffer',



reply via email to

[Prev in Thread] Current Thread [Next in Thread]