Bugzilla – Attachment 67500 Details for
Bug 19190
Silly calculation of average time in touch_all scripts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19190: [Follow-up] Do not rely on the return of ModItem
Bug-19190-Follow-up-Do-not-rely-on-the-return-of-M.patch (text/plain), 1.46 KB, created by
Marcel de Rooy
on 2017-10-02 08:33:25 UTC
(
hide
)
Description:
Bug 19190: [Follow-up] Do not rely on the return of ModItem
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2017-10-02 08:33:25 UTC
Size:
1.46 KB
patch
obsolete
>From d6e42101509f8ed0adffcd23b3baaf8bb28a10f1 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 28 Aug 2017 12:13:26 +0200 >Subject: [PATCH] Bug 19190: [Follow-up] Do not rely on the return of ModItem >Content-Type: text/plain; charset=utf-8 > >touch_all_items looks at the return of ModItem to determine if the >operation was successful. But ModItem does not return a meaningful >value. This patch puts the ModItem call in an eval and looks at $@. > >Test plan: >Run touch_all_items with a where condition and verbose option. >Put print 1/0; at the end of ModItem. >Run touch_all_items again. You should see: ERROR WITH ITEM xxx !!!! > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: David Bourgault <david.bourgault@inlibro.com> >--- > misc/maintenance/touch_all_items.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/misc/maintenance/touch_all_items.pl b/misc/maintenance/touch_all_items.pl >index 64c70e3..12dca00 100755 >--- a/misc/maintenance/touch_all_items.pl >+++ b/misc/maintenance/touch_all_items.pl >@@ -79,7 +79,8 @@ $sth_fetch->execute(); > # fetch info from the search > while (my ($biblionumber, $itemnumber, $itemcallnumber) = $sth_fetch->fetchrow_array){ > >- my $modok = ModItem({itemcallnumber => $itemcallnumber}, $biblionumber, $itemnumber); >+ eval { ModItem({itemcallnumber => $itemcallnumber}, $biblionumber, $itemnumber); }; >+ my $modok = $@ ? 0 : 1; > > if ($modok) { > $goodcount++; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19190
:
66550
|
66551
|
67332
|
67499
|
67500
|
67752
|
67753