[open-ils-commits] r15359 - trunk/Open-ILS/src/support-scripts (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Jan 21 13:06:30 EST 2010


Author: erickson
Date: 2010-01-21 13:06:26 -0500 (Thu, 21 Jan 2010)
New Revision: 15359

Modified:
   trunk/Open-ILS/src/support-scripts/action_trigger_runner.pl
Log:
Patch from Joe Atzberger to verify custom filter file opened successfully

Modified: trunk/Open-ILS/src/support-scripts/action_trigger_runner.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/action_trigger_runner.pl	2010-01-21 17:58:44 UTC (rev 15358)
+++ trunk/Open-ILS/src/support-scripts/action_trigger_runner.pl	2010-01-21 18:06:26 UTC (rev 15359)
@@ -62,9 +62,12 @@
 };
 
 if ($opt_custom_filter) {
-    open FILTERS, $opt_custom_filter;
-    $hook_handlers = OpenSRF::Utils::JSON->JSON2perl(join('',(<FILTERS>)));
-    close FILTERS;
+    if (open FILTERS, $opt_custom_filter) {
+        $hook_handlers = OpenSRF::Utils::JSON->JSON2perl(join('',(<FILTERS>)));
+        close FILTERS;
+    } else {
+        die "Cannot read filter file '$opt_custom_filter'";
+    }
 }
 
 sub help {



More information about the open-ils-commits mailing list