Skip to content

Commit cec0cc8

Browse files
authored
Merge pull request #25 from caternuson/iss24
Allow bytes as well
2 parents 671164e + 78db609 commit cec0cc8

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)