mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 23:02:19 +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'
|
method = 'POST'
|
||||||
|
|
||||||
headers = {"Content-type": "application/x-www-form-urlencoded"}
|
headers = {"Content-type": "application/x-www-form-urlencoded"}
|
||||||
|
conn = httplib.HTTPConnection(API_URL)
|
||||||
try:
|
try:
|
||||||
conn = httplib.HTTPConnection(API_URL)
|
conn.request(method, url_path, paramstr, headers)
|
||||||
except socket.error:
|
except socket.error:
|
||||||
return None
|
return None
|
||||||
conn.request(method, url_path, paramstr, headers)
|
|
||||||
response = conn.getresponse()
|
response = conn.getresponse()
|
||||||
|
|
||||||
if response.status == 200:
|
if response.status == 200:
|
||||||
|
|||||||
Reference in New Issue
Block a user