@@ -172,7 +172,7 @@ def __init__(self):
172172 self .cache_location = os .path .join (
173173 conf .cache_location ,
174174 self .__class__ .__name__ .split ("Class" )[0 ])
175-
175+
176176 self .use_cache = conf .use_cache
177177 self .cache_timeout = conf .default_cache_timeout
178178
@@ -185,18 +185,18 @@ def clear_cache(self):
185185
186186 cache_files = [x for x in os .listdir (self .cache_location ) if x .endswith ("pickle" )]
187187 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 ))
189189
190190 def reset_cache_preferences (self ):
191191 """Resets cache preferences to default values"""
192192
193193 self .cache_location = os .path .join (
194194 conf .cache_location ,
195195 self .__class__ .__name__ .split ("Class" )[0 ])
196-
196+
197197 self .use_cache = conf .use_cache
198198 self .cache_timeout = conf .default_cache_timeout
199-
199+
200200
201201 def _request (self , method , url , params = None , data = None , headers = None ,
202202 files = None , save = False , savedir = '' , timeout = None , cache = None ,
@@ -255,19 +255,19 @@ def _request(self, method, url, params=None, data=None, headers=None,
255255 files = files ,
256256 timeout = timeout
257257 )
258-
258+
259259 if (cache is not False ) and self .use_cache :
260260 cache = True
261261 else :
262262 cache = False
263-
263+
264264 if save :
265265 local_filename = url .split ('/' )[- 1 ]
266266 if os .name == 'nt' :
267267 # Windows doesn't allow special characters in filenames like
268268 # ":" so replace them with an underscore
269269 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 )
271271 self ._download_file (url , local_filepath , cache = cache ,
272272 continuation = continuation , method = method ,
273273 auth = auth , ** req_kwargs )
0 commit comments