@@ -172,7 +172,7 @@ def __init__(self):
172
172
self .cache_location = os .path .join (
173
173
conf .cache_location ,
174
174
self .__class__ .__name__ .split ("Class" )[0 ])
175
-
175
+
176
176
self .use_cache = conf .use_cache
177
177
self .cache_timeout = conf .default_cache_timeout
178
178
@@ -185,18 +185,18 @@ def clear_cache(self):
185
185
186
186
cache_files = [x for x in os .listdir (self .cache_location ) if x .endswith ("pickle" )]
187
187
for fle in cache_files :
188
- os .remove (os .path .join (self .cache_location ,fle ))
188
+ os .remove (os .path .join (self .cache_location , fle ))
189
189
190
190
def reset_cache_preferences (self ):
191
191
"""Resets cache preferences to default values"""
192
192
193
193
self .cache_location = os .path .join (
194
194
conf .cache_location ,
195
195
self .__class__ .__name__ .split ("Class" )[0 ])
196
-
196
+
197
197
self .use_cache = conf .use_cache
198
198
self .cache_timeout = conf .default_cache_timeout
199
-
199
+
200
200
201
201
def _request (self , method , url , params = None , data = None , headers = None ,
202
202
files = None , save = False , savedir = '' , timeout = None , cache = None ,
@@ -255,19 +255,19 @@ def _request(self, method, url, params=None, data=None, headers=None,
255
255
files = files ,
256
256
timeout = timeout
257
257
)
258
-
258
+
259
259
if (cache is not False ) and self .use_cache :
260
260
cache = True
261
261
else :
262
262
cache = False
263
-
263
+
264
264
if save :
265
265
local_filename = url .split ('/' )[- 1 ]
266
266
if os .name == 'nt' :
267
267
# Windows doesn't allow special characters in filenames like
268
268
# ":" so replace them with an underscore
269
269
local_filename = local_filename .replace (':' , '_' )
270
- local_filepath = os .path .join (savedir or self .cache_location or '.' , local_filename )
270
+ local_filepath = os .path .join (savedir or self .cache_location or '.' , local_filename )
271
271
self ._download_file (url , local_filepath , cache = cache ,
272
272
continuation = continuation , method = method ,
273
273
auth = auth , ** req_kwargs )
0 commit comments