浏览代码

Changing arguments to orthancQR.addModality to name, dict where dict contains fields AET,Host and Port

Andrej 1 周之前
父节点
当前提交
a82dd07944
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      orthancQR.py

+ 3 - 2
orthancQR.py

@@ -12,9 +12,10 @@ class orthancQR:
       fconfig=os.path.join(os.path.expanduser('~'),'.labkey',f'{server}.json')
       self.net.init(fconfig)
 
-   def addModality(self,name,aet,host,port):
+   def addModality(self,name,v):
+      #add modality with the name name and settings as shown below
+      #v={"AET":aet,"Host":host,"Port":port}
       apiURL='/'.join([self.net.getCoreURL(),'modalities',name])
-      v={"AET":aet,"Host":host,"Port":port}
       response=self.net.put(apiURL,json.dumps(v),'json',timeout=urllib3.util.Timeout(read=0.5))
 
    def removeModality(self,name):