mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-13 22:32:15 +00:00
Fix exceptions, and remove the timeout (Python 2.5 compatability)
This commit is contained in:
@@ -6,7 +6,7 @@ class DocumentRetrievalError(Exception):
|
||||
self.value = value
|
||||
|
||||
def __str__(self):
|
||||
return self.__doc__ % value
|
||||
return self.__doc__ % self.value
|
||||
|
||||
class InvalidDocument(Exception):
|
||||
"""
|
||||
|
||||
@@ -76,7 +76,7 @@ class CachedDocumentManager(models.Manager):
|
||||
req = urllib2.Request(url)
|
||||
req.add_header('CCP-Contact', 'matalok@pleaseignore.com')
|
||||
try:
|
||||
conn = urllib2.urlopen(req, timeout=60)
|
||||
conn = urllib2.urlopen(req)
|
||||
except urllib2.HTTPError, e:
|
||||
raise DocumentRetrievalError(e.code)
|
||||
except urllib2.URLError, e:
|
||||
|
||||
Reference in New Issue
Block a user