[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 06/10: grc: evaluate cheetah template to re
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 06/10: grc: evaluate cheetah template to resolve 'optional' tag in port definition |
Date: |
Mon, 13 Feb 2017 00:34:50 +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 88445d0d3511528ddddb5eb2c37a7739edff534b
Author: Sean Nowlan <address@hidden>
Date: Thu Feb 2 14:15:39 2017 -0500
grc: evaluate cheetah template to resolve 'optional' tag in port definition
---
grc/core/Port.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/grc/core/Port.py b/grc/core/Port.py
index f740a69..acf4eea 100644
--- a/grc/core/Port.py
+++ b/grc/core/Port.py
@@ -168,7 +168,8 @@ class Port(Element):
self._nports = n.find('nports') or ''
self._vlen = n.find('vlen') or ''
- self._optional = bool(n.find('optional'))
+ self._optional = n.find('optional') or ''
+ self._optional_evaluated = False # Updated on rewrite()
self._clones = [] # References to cloned ports (for nports > 1)
def __str__(self):
@@ -208,6 +209,8 @@ class Port(Element):
hide =
self.get_parent().resolve_dependencies(self._hide).strip().lower()
self._hide_evaluated = False if hide in ('false', 'off', '0') else
bool(hide)
+ optional =
self.get_parent().resolve_dependencies(self._optional).strip().lower()
+ self._optional_evaluated = False if optional in ('false', 'off', '0')
else bool(optional)
# Update domain if was deduced from (dynamic) port type
type_ = self.get_type()
@@ -272,7 +275,7 @@ class Port(Element):
return 1
def get_optional(self):
- return bool(self._optional)
+ return self._optional_evaluated
def get_color(self):
"""
- [Commit-gnuradio] [gnuradio] branch maint updated (884eddf -> b49da16), git, 2017/02/12
- [Commit-gnuradio] [gnuradio] 07/10: analog: add missing probe_avg_mag_sqrd_cf block to GRC definition, git, 2017/02/12
- [Commit-gnuradio] [gnuradio] 08/10: analog: simplify probe_avg_mag_sqrd_x block GRC file, git, 2017/02/12
- [Commit-gnuradio] [gnuradio] 09/10: Merge remote-tracking branch 'nowls/add_probe_av_mag2_cf_grc_def' into maint, git, 2017/02/12
- [Commit-gnuradio] [gnuradio] 04/10: runtime: missing API export for block stream operator, git, 2017/02/12
- [Commit-gnuradio] [gnuradio] 06/10: grc: evaluate cheetah template to resolve 'optional' tag in port definition,
git <=
- [Commit-gnuradio] [gnuradio] 05/10: cmake: removed stdint, inttypes, stdbool compat headers, git, 2017/02/12
- [Commit-gnuradio] [gnuradio] 03/10: cmake: updates to msvc config.h, git, 2017/02/12
- [Commit-gnuradio] [gnuradio] 10/10: Merge remote-tracking branch 'josh/win_build' into maint, git, 2017/02/12
- [Commit-gnuradio] [gnuradio] 01/10: runtime: ifdef out unistd.h in public header, git, 2017/02/12
- [Commit-gnuradio] [gnuradio] 02/10: dtv: switch to hex format for number constants, git, 2017/02/12