diff options
author | jblum | 2009-02-06 19:01:10 +0000 |
---|---|---|
committer | jblum | 2009-02-06 19:01:10 +0000 |
commit | c077a28498d2691f28e34846667575a8c4dc6859 (patch) | |
tree | 37df84b3c15508ace6f5668e10d7713db0186be8 /grc/src/platforms/base/Element.py | |
parent | f23f2dee67cf7a0e3aa7ccfbf889ecc2177826bf (diff) | |
download | gnuradio-c077a28498d2691f28e34846667575a8c4dc6859.tar.gz gnuradio-c077a28498d2691f28e34846667575a8c4dc6859.tar.bz2 gnuradio-c077a28498d2691f28e34846667575a8c4dc6859.zip |
grc: better handling of disabled elements
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10403 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/src/platforms/base/Element.py')
-rw-r--r-- | grc/src/platforms/base/Element.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/grc/src/platforms/base/Element.py b/grc/src/platforms/base/Element.py index b6602a314..a16be9127 100644 --- a/grc/src/platforms/base/Element.py +++ b/grc/src/platforms/base/Element.py @@ -41,10 +41,13 @@ class Element(object): def is_valid(self): self._error_messages = []#reset err msgs - try: self.validate() - except: pass + if self.get_enabled(): + try: self.validate() + except: pass return not self.get_error_messages() + def get_enabled(self): return True + def _add_error_message(self, msg): self._error_messages.append(msg) |