浏览代码

Adding timeout to orthancInterface delete

Andrej 1 月之前
父节点
当前提交
5dbd99dbc1
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      orthancInterface.py

+ 2 - 2
orthancInterface.py

@@ -97,7 +97,7 @@ class orthancInterface:
             print(e)
      
 
-    def delete(self,url):
+    def delete(self,url,timeout=None):
 
         debug=False
         if debug:
@@ -105,7 +105,7 @@ class orthancInterface:
         
         headers=urllib3.util.make_headers(basic_auth=self.getBasicAuth())
         try:
-            return self.http.request('DELETE',url,headers=headers)
+            return self.http.request('DELETE',url,headers=headers,timeout=timeout)
         except urllib3.exceptions.HTTPError as e:
             print(e)
             return None