@@ -182,11 +182,14 @@ def _api_request(url, params, timeout=None):
182
182
with requests .Session () as session :
183
183
session .mount ('http://' , CompressedHTTPAdapter ())
184
184
try :
185
- response = session .post (url , data = params , headers = headers , timeout = timeout )
185
+ response = session .post (url , data = params , headers = headers ,
186
+ timeout = timeout )
186
187
except requests .exceptions .RequestException as exc :
187
188
raise WebServiceError ("HTTP request failed: {0}" .format (exc ))
188
189
except requests .exceptions .ReadTimeout :
189
- raise WebServiceError ("HTTP timed out ({0}s)" .format (timeout ))
190
+ raise WebServiceError (
191
+ "HTTP request timed out ({0}s)" .format (timeout )
192
+ )
190
193
191
194
try :
192
195
return response .json ()
@@ -332,7 +335,8 @@ def fingerprint_file(path, maxlength=MAX_AUDIO_LENGTH, force_fpcalc=False):
332
335
return _fingerprint_file_fpcalc (path , maxlength )
333
336
334
337
335
- def match (apikey , path , meta = DEFAULT_META , parse = True , force_fpcalc = False , timeout = None ):
338
+ def match (apikey , path , meta = DEFAULT_META , parse = True , force_fpcalc = False ,
339
+ timeout = None ):
336
340
"""Look up the metadata for an audio file. If ``parse`` is true,
337
341
then ``parse_lookup_result`` is used to return an iterator over
338
342
small tuple of relevant information; otherwise, the full parsed JSON
0 commit comments