From c18b89e4cabfc28081a7893ccd4cf8956c9a797f Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Wed, 9 Sep 2020 14:56:55 -0400 Subject: add support to databuffers, cstr helper, and bv.write for bytearrays --- python/binaryview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/binaryview.py') diff --git a/python/binaryview.py b/python/binaryview.py index 49a80a4a..4a73a5a7 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -2680,7 +2680,7 @@ class BinaryView(object): >>> bv.read(0,4) 'AAAA' """ - if not isinstance(data, bytes): + if not (isinstance(data, bytes) or isinstance(data, bytearray)): if isinstance(data, str): buf = databuffer.DataBuffer(data.encode()) else: -- cgit v1.3.1