Sfoglia il codice sorgente

修复附件数据处理异常Failed to establish a new connection

luojiehua 1 anno fa
parent
commit
82b05461be
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1 2
      BaseDataMaintenance/dataSource/interface.py

+ 1 - 2
BaseDataMaintenance/dataSource/interface.py

@@ -35,8 +35,7 @@ def getAttachDealInterface(_data,_type,path="",restry=1,kwargs={},url=interface_
             if len(kwargs.keys())>0:
                 _json.update(kwargs)
             headers = {"Content-Type":"application/json"}
-            with requests.Session() as session:
-                _resp = session.post(url,data=_json,timeout=timeout,headers=headers)
+            _resp = requests.post(url,data=_json,timeout=timeout,headers=headers)
 
             if _resp.status_code==200:
                 _result = json.loads(_resp.content.decode())