mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Move exception trapping to the actual location the exception occures.
This commit is contained in:
@@ -48,11 +48,11 @@ class CachedDocumentManager(models.Manager):
|
||||
method = 'POST'
|
||||
|
||||
headers = {"Content-type": "application/x-www-form-urlencoded"}
|
||||
conn = httplib.HTTPConnection(API_URL)
|
||||
try:
|
||||
conn = httplib.HTTPConnection(API_URL)
|
||||
conn.request(method, url_path, paramstr, headers)
|
||||
except socket.error:
|
||||
return None
|
||||
conn.request(method, url_path, paramstr, headers)
|
||||
response = conn.getresponse()
|
||||
|
||||
if response.status == 200:
|
||||
|
||||
Reference in New Issue
Block a user