From 58a096dbb661dfeaadad08264e18c57c121e846d Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 5 Dec 2017 16:38:37 -0800 Subject: mpm: bfrfs: Assert reference buffer is a byte string Reviewed-By: Brent Stapleton --- mpm/python/usrp_mpm/bfrfs.py | 1 + 1 file changed, 1 insertion(+) (limited to 'mpm/python/usrp_mpm/bfrfs.py') diff --git a/mpm/python/usrp_mpm/bfrfs.py b/mpm/python/usrp_mpm/bfrfs.py index 78930913d..7a673e4eb 100644 --- a/mpm/python/usrp_mpm/bfrfs.py +++ b/mpm/python/usrp_mpm/bfrfs.py @@ -80,6 +80,7 @@ class BufferFS(object): def __init__(self, raw_data_buffer, max_size=None, alignment=None, log=None): + assert isinstance(raw_data_buffer, bytes) self.max_size = len(raw_data_buffer) if max_size is None else max_size self.raw_data_buffer = raw_data_buffer[:self.max_size] self.alignment = alignment or DEFAULT_ALIGNMENT -- cgit v1.2.3