Skip to content

Commit 78db609

Browse files
committed
add bytes
1 parent 671164e commit 78db609

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_fram.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ def __setitem__(self, address, value):
169169
raise RuntimeError("FRAM currently write protected.")
170170

171171
if isinstance(address, int):
172-
if not isinstance(value, (int, bytearray, list, tuple)):
172+
if not isinstance(value, (int, bytes, bytearray, list, tuple)):
173173
raise ValueError(
174-
"Data must be a single integer, or a bytearray," " list, or tuple."
174+
"Data must be a single integer, bytes, bytearray, list, or tuple."
175175
)
176176
if not 0 <= address < self._max_size:
177177
raise ValueError(

0 commit comments

Comments
 (0)