[project @ handle IOErrors from xsend]
authorDiane Trout <diane@caltech.edu>
Tue, 16 Oct 2007 22:53:43 +0000 (22:53 +0000)
committerDiane Trout <diane@caltech.edu>
Tue, 16 Oct 2007 22:53:43 +0000 (22:53 +0000)
uashelper/spoolwatcher.py

index cad3b2085a1f1fbe84389f5a6fb181b041c21543..bba9fdbe5a4c77b4642764279a8b45af6107cc3f 100644 (file)
@@ -22,7 +22,11 @@ class Handler(pyinotify.ProcessEvent):
       msg = "Create: %s" %  os.path.join(event.path, event.name)
       if event.name.lower() == "run.completed":
         print "Run is done!"
-        send(self.runner_jid, "a run finished, launch it, and swap the drive")
+        try:
+          send(self.runner_jid, "a run finished, launch it, and swap the drive")
+        except IOError, e:
+          print "ERROR: couldn't send message"
+          print str(e)
       print msg
 
     def process_IN_DELETE(self, event):