Raise the correct exception on readtimeout errors, fixes #297

This commit is contained in:
2012-08-09 20:22:09 +01:00
parent acc7a5c669
commit a667077c4b

View File

@@ -103,7 +103,10 @@ class CachedDocumentManager(models.Manager):
stat_update_count('eve_proxy_api_exception')
raise DocumentRetrievalError(e.reason)
else:
try:
doc.body = unicode(conn.read(), 'utf-8')
except Exception, e:
raise DocumentRetrievalError(e)
doc.time_retrieved = now()
error = 0