|
@@ -743,12 +743,12 @@ class SerialNumberView(View):
|
|
|
data['ip'] = CommonService.get_ip_address(request)
|
|
|
data['region_id'] = CommonService.confirm_region_id()
|
|
|
try:
|
|
|
- r = requests.post(url=url, data=data, timeout=15)
|
|
|
+ r = requests.post(url=url, data=data, timeout=10)
|
|
|
assert r.status_code == 200
|
|
|
res = r.json()
|
|
|
assert res['result_code'] == 0
|
|
|
- except (TimeoutError, AssertionError):
|
|
|
- return response.json(5)
|
|
|
+ except Exception as e:
|
|
|
+ pass
|
|
|
# 美洲服,处理请求和保存数据
|
|
|
else:
|
|
|
data = {}
|