소스 검색

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):