diff options
author | Michael Byers <ByersJR.Michael@gmail.com> | 2020-01-07 14:57:39 -0500 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2020-02-09 19:24:04 +0100 |
commit | deeece0502595dff0a27ed4ee8159ee64b7fb3ea (patch) | |
tree | 69c9b9fc2f54408fda88d54d66c2015df4ed54cd /gr-digital/python | |
parent | 7d619aed8b8eb185890df2940cbee5de6062c4bd (diff) |
pmt: Fix RuntimeError in pmt_to_python
Python has a RuntimeError that's thrown during the pmt to_python function.
Instead of throwing this error, SWIG has been updated to throw a TypeError.
This allows us to keep the same behavior whereby we iterate over PMT types
until the proper conversion is found
Diffstat (limited to 'gr-digital/python')
-rw-r--r-- | gr-digital/python/digital/qa_ofdm_carrier_allocator_cvc.py | 8 | ||||
-rw-r--r-- | gr-digital/python/digital/qa_ofdm_serializer_vcc.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gr-digital/python/digital/qa_ofdm_carrier_allocator_cvc.py b/gr-digital/python/digital/qa_ofdm_carrier_allocator_cvc.py index 78ea0d9d35..e6671965c9 100644 --- a/gr-digital/python/digital/qa_ofdm_carrier_allocator_cvc.py +++ b/gr-digital/python/digital/qa_ofdm_carrier_allocator_cvc.py @@ -198,12 +198,12 @@ class qa_digital_carrier_allocator_cvc (gr_unittest.TestCase): def test_004_t (self): """ - Provoking RuntimeError exceptions providing wrong user input (earlier invisible SIGFPE). + Provoking TypeError exceptions providing wrong user input (earlier invisible SIGFPE). """ fft_len = 6 # Occupied carriers - with self.assertRaises(RuntimeError) as oc: + with self.assertRaises(TypeError) as oc: alloc = digital.ofdm_carrier_allocator_cvc(fft_len, (), ((),), @@ -212,7 +212,7 @@ class qa_digital_carrier_allocator_cvc (gr_unittest.TestCase): self.tsb_key) # Pilot carriers - with self.assertRaises(RuntimeError) as pc: + with self.assertRaises(TypeError) as pc: alloc = digital.ofdm_carrier_allocator_cvc(fft_len, ((),), (), @@ -221,7 +221,7 @@ class qa_digital_carrier_allocator_cvc (gr_unittest.TestCase): self.tsb_key) # Pilot carrier symbols - with self.assertRaises(RuntimeError) as ps: + with self.assertRaises(TypeError) as ps: alloc = digital.ofdm_carrier_allocator_cvc(fft_len, ((),), ((),), diff --git a/gr-digital/python/digital/qa_ofdm_serializer_vcc.py b/gr-digital/python/digital/qa_ofdm_serializer_vcc.py index edfd1a2f03..0a1befe5b7 100644 --- a/gr-digital/python/digital/qa_ofdm_serializer_vcc.py +++ b/gr-digital/python/digital/qa_ofdm_serializer_vcc.py @@ -195,7 +195,7 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase): """ Make sure it fails if it should """ fft_len = 16 occupied_carriers = ((1, 3, 4, 11, 12, 112),) # Something invalid - self.assertRaises(RuntimeError, digital.ofdm_serializer_vcc, fft_len, occupied_carriers, self.tsb_key) + self.assertRaises(TypeError, digital.ofdm_serializer_vcc, fft_len, occupied_carriers, self.tsb_key) if __name__ == '__main__': |