From bf232a6e6e73d156c9a46c26842480352c6794c0 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Thu, 20 Aug 2009 01:30:23 -0700 Subject: added continuation mode for pad source and sinks --- grc/base/Block.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'grc/base/Block.py') diff --git a/grc/base/Block.py b/grc/base/Block.py index 82d276567..349e71f76 100644 --- a/grc/base/Block.py +++ b/grc/base/Block.py @@ -47,7 +47,9 @@ class TemplateArg(UserDict): return self._param.get_evaluated() def _get_keys(lst): return [elem.get_key() for elem in lst] -def _get_elem(lst, key): return lst[_get_keys(lst).index(key)] +def _get_elem(lst, key): + try: return lst[_get_keys(lst).index(key)] + except ValueError: raise ValueError, 'Key "%s" not found in %s.'%(key, _get_keys(lst)) class Block(Element): -- cgit