[open-ils-commits] r20323 - trunk/Open-ILS/src/support-scripts (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Apr 26 13:18:18 EDT 2011


Author: dbs
Date: 2011-04-26 13:18:14 -0400 (Tue, 26 Apr 2011)
New Revision: 20323

Modified:
   trunk/Open-ILS/src/support-scripts/authority_control_fields.pl
Log:
Protect against errors returned by open-ils.search

If open-ils.search returns an error rather than a result, prevent
authority_control_fields.pl from bombing out completely; instead,
flag the problem in STDERR and move on to the next record.


Modified: trunk/Open-ILS/src/support-scripts/authority_control_fields.pl
===================================================================
--- trunk/Open-ILS/src/support-scripts/authority_control_fields.pl	2011-04-26 15:49:38 UTC (rev 20322)
+++ trunk/Open-ILS/src/support-scripts/authority_control_fields.pl	2011-04-26 17:18:14 UTC (rev 20323)
@@ -395,6 +395,12 @@
 
             # print Dumper($validates);
 
+            # Protect against failed (error condition) search request
+            if (!$validates) {
+                print STDERR "Search for matching authority failed; record # $rec_id\n";
+                next;
+            }
+
             if (scalar(@$validates) == 0) {
                 next;
             }



More information about the open-ils-commits mailing list