diff options
author | Andrej Rode <mail@andrejro.de> | 2018-08-05 17:58:20 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-08-17 18:18:20 +0200 |
commit | 2727e413a26024b17e649bc370afc45503173af6 (patch) | |
tree | 2db64a5e1ec3616e40e1ab1e485ea9884159cf70 /gr-blocks/python | |
parent | b9c8c6c3dad2c864655786c8f6ce22910c82e174 (diff) |
py3k: remove the six.b call since only py2.6 support depends on that
Replace with encode('utf-8') mapping the surrogate mapped characters back to
their original byte values. As per documentation
http://www.swig.org/Doc3.0/Python.html 36.12.4
Add wrappercode to the swig definition to run python encode for Python3 and
return raw bytes for Python2.
Diffstat (limited to 'gr-blocks/python')
-rw-r--r-- | gr-blocks/python/blocks/qa_bin_statistics.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gr-blocks/python/blocks/qa_bin_statistics.py b/gr-blocks/python/blocks/qa_bin_statistics.py index e6bdfaca5b..b3a8c3de81 100644 --- a/gr-blocks/python/blocks/qa_bin_statistics.py +++ b/gr-blocks/python/blocks/qa_bin_statistics.py @@ -30,8 +30,6 @@ from __future__ import print_function import struct -import six - from gnuradio import gr, gr_unittest, blocks @@ -93,7 +91,7 @@ class parse_msg(object): self.center_freq = msg.arg1() self.vlen = int(msg.arg2()) assert(msg.length() == self.vlen * gr.sizeof_float) - self.data = struct.unpack(b'%df' % self.vlen, six.b(msg.to_string())) + self.data = struct.unpack(b'%df' % self.vlen, msg.to_string()) class test_bin_statistics(gr_unittest.TestCase): |