commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 31/57: fec: use logger to explain exception


From: git
Subject: [Commit-gnuradio] [gnuradio] 31/57: fec: use logger to explain exception when using threading with history.
Date: Wed, 21 May 2014 03:10:27 +0000 (UTC)

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

trondeau pushed a commit to branch master
in repository gnuradio.

commit 1902afd22cb36305c14467fe8e9852e312336579
Author: Tom Rondeau <address@hidden>
Date:   Mon May 12 12:40:25 2014 -0400

    fec: use logger to explain exception when using threading with history.
---
 gr-fec/python/fec/extended_decoder.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gr-fec/python/fec/extended_decoder.py 
b/gr-fec/python/fec/extended_decoder.py
index d50746c..17c9810 100644
--- a/gr-fec/python/fec/extended_decoder.py
+++ b/gr-fec/python/fec/extended_decoder.py
@@ -23,6 +23,7 @@
 from gnuradio import gr, blocks, digital
 import fec_swig as fec
 from bitflip import *
+import sys
 
 from threaded_decoder import threaded_decoder
 from capillary_threaded_decoder import capillary_threaded_decoder
@@ -137,7 +138,9 @@ class extended_decoder(gr.hier_block2):
             self.blocks.append(blocks.unpacked_to_packed_bb(1,0))
 
         if(len(decoder_obj_list) > 1):
-            assert fec.get_history(decoder_obj_list[0]) == 0
+            if(fec.get_history(decoder_obj_list[0]) != 0):
+                gr.log.info("fec.extended_decoder: Cannot use multi-threaded 
parallelism on a decoder with history.")
+                raise AttributeError
 
         if threading == 'capillary':
             self.blocks.append(capillary_threaded_decoder(decoder_obj_list,



reply via email to

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