Skip to content

Commit

Permalink
yet another HTTP failure more: raising IOError
Browse files Browse the repository at this point in the history
  • Loading branch information
sampsyo committed Oct 15, 2010
1 parent ec9a2c1 commit faa8667
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lastfp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def fpid_query(duration, fpdata, metadata=None):
raise CommunicationError('ID query failed')
except httplib.BadStatusLine:
raise CommunicationError('bad response in ID query')
except IOError:
raise CommunicationError('ID query failed')

try:
fpid, status = res.split()[:2]
Expand Down Expand Up @@ -146,6 +148,8 @@ def metadata_query(fpid, apikey):
raise CommunicationError('metadata query failed')
except httplib.BadStatusLine:
raise CommunicationError('bad response in metadata query')
except IOError:
raise CommunicationError('metadata query failed')
return fh.read()

class ExtractionError(FingerprintError):
Expand Down

0 comments on commit faa8667

Please sign in to comment.