Skip to content

Commit 0e1529d

Browse files
authored
Merge pull request #11 from makermelissa/json_path
fetch_data requires less strict json_path
2 parents bb6607f + a9d70ac commit 0e1529d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

adafruit_matrixportal/network.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,11 @@ def fetch_data(
355355

356356
response = self.fetch(url, headers=headers, timeout=timeout)
357357

358-
if json_path:
358+
if json_path is not None:
359+
if isinstance(json_path, (list, tuple)) and (
360+
not json_path or not isinstance(json_path[0], (list, tuple))
361+
):
362+
json_path = (json_path,)
359363
try:
360364
gc.collect()
361365
json_out = response.json()

0 commit comments

Comments
 (0)