Browse Source

Adding watchdog to sendResource to report malformed jobDescription

Andrej 3 days ago
parent
commit
11fe5b042a
1 changed files with 6 additions and 1 deletions
  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):