[open-ils-commits] r20324 - branches/rel_2_1/Open-ILS/src/support-scripts (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Apr 26 13:23:52 EDT 2011
Author: dbs
Date: 2011-04-26 13:23:48 -0400 (Tue, 26 Apr 2011)
New Revision: 20324
Modified:
branches/rel_2_1/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: branches/rel_2_1/Open-ILS/src/support-scripts/authority_control_fields.pl
===================================================================
--- branches/rel_2_1/Open-ILS/src/support-scripts/authority_control_fields.pl 2011-04-26 17:18:14 UTC (rev 20323)
+++ branches/rel_2_1/Open-ILS/src/support-scripts/authority_control_fields.pl 2011-04-26 17:23:48 UTC (rev 20324)
@@ -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