File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 28
28
from adafruit_io .adafruit_io import IO_HTTP , AdafruitIO_RequestError
29
29
from adafruit_fakerequests import Fake_Requests
30
30
31
- try :
32
- import supervisor
33
- except ImportError :
34
- supervisor = None
35
-
36
31
try :
37
32
import rtc
38
33
except ImportError :
@@ -109,7 +104,6 @@ def __init__(
109
104
else :
110
105
self ._secrets = secrets
111
106
112
- # This may be removed. Using for testing
113
107
self .requests = None
114
108
115
109
try :
@@ -548,10 +542,10 @@ def _parse_data(
548
542
except ValueError : # failed to parse?
549
543
print ("Couldn't parse json: " , response .text )
550
544
raise
551
- except MemoryError :
552
- if supervisor is not None :
553
- supervisor . reload ( )
554
- raise
545
+ except MemoryError as error :
546
+ raise MemoryError (
547
+ "{} (data is likely too large)" . format ( error )
548
+ ) from error
555
549
556
550
if content_type == CONTENT_JSON :
557
551
values = self .process_json (json_out , json_path )
You can’t perform that action at this time.
0 commit comments