diff options
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/gr/hier_block2.py')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gr/hier_block2.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gr/hier_block2.py b/gnuradio-runtime/python/gnuradio/gr/hier_block2.py index cbb6e77392..4d0f428174 100644 --- a/gnuradio-runtime/python/gnuradio/gr/hier_block2.py +++ b/gnuradio-runtime/python/gnuradio/gr/hier_block2.py @@ -19,12 +19,14 @@ def _multiple_endpoints(func): @functools.wraps(func) def wrapped(self, *points): if not points: - raise ValueError("At least one block required for " + func.__name__) + raise ValueError( + "At least one block required for " + func.__name__) elif len(points) == 1: try: block = points[0].to_basic_block() except AttributeError: - raise ValueError("At least two endpoints required for " + func.__name__) + raise ValueError( + "At least two endpoints required for " + func.__name__) func(self, block) else: try: @@ -75,7 +77,7 @@ class hier_block2(object): """ Pass-through member requests to the C++ object. """ - + try: object.__getattribute__(self, "_impl") except AttributeError as exception: @@ -84,7 +86,6 @@ class hier_block2(object): "a derived class?".format(object.__getattribute__(self.__class__, "__name__"))) from exception return getattr(self._impl, name) - # FIXME: these should really be implemented # in the original C++ class (gr_hier_block2), then they would all be inherited here |