瀏覽代碼

Adding watchdog to sendResource to report malformed jobDescription

Andrej 3 天之前
父節點
當前提交
11fe5b042a
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      orthancPeers.py

+ 6 - 1
orthancPeers.py

@@ -61,7 +61,12 @@ class orthancPeers:
 
     def sendResource(self,name,orthancId):
         jobDescription=self.createSendJob(name,orthancId)
-        jobId=jobDescription['ID']
+        try:
+         jobId=jobDescription['ID']
+        except KeyError:
+         print(jobDescription)
+         return False
+
         return self.monitorProgress(jobId)
 
     def monitorProgress(self,jobId,tSleepGuess=10):