File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 347
347
- 2.8 .3 Fix key error
348
348
- 2.8 .4 Feat resist cache perms
349
349
- 2.8 .5 Fix cache not found on perms error
350
+ - 2.8 .6 Fix none error on no cache data
350
351
351
352
# # 2.8.0
352
353
Original file line number Diff line number Diff line change 19
19
get_latest = Meteo .get_latest
20
20
get_uvindex = Meteo .get_uvindex
21
21
22
- __version__ = "2.8.5 "
22
+ __version__ = "2.8.6 "
Original file line number Diff line number Diff line change @@ -122,13 +122,16 @@ def get_from_cache(cls, key):
122
122
123
123
@classmethod
124
124
def add_to_cache (cls , key , data ):
125
- cache_data = cls .get_cache_data ()
126
- cache_data [cls .today ][key ] = data
125
+
127
126
128
127
try :
128
+ cache_data = cls .get_cache_data ()
129
+ cache_data [cls .today ][key ] = data
129
130
with open (cache_path (), 'w+' ) as f :
130
131
json .dump (cache_data , f )
131
132
cls .CACHE_PERMS = True
133
+ except TypeError :
134
+ cls .CACHE_PERMS = False
132
135
except PermissionError :
133
136
cls .CACHE_PERMS = False
134
137
You can’t perform that action at this time.
0 commit comments