From 81b6fcefc1e2f26f6e9e9c8c4855b6cc361ca0df Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Sun, 15 Jul 2018 09:07:54 -0700 Subject: [PATCH] Don't die on any failure; just move on to next file. I'm going to leave the files as is if I can't really validly process them at all, so the indicator that I finished the operation is renaming the file. --- scripts/rt-outreachy-payment-next.plx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/rt-outreachy-payment-next.plx b/scripts/rt-outreachy-payment-next.plx index f702d43..d132dde 100755 --- a/scripts/rt-outreachy-payment-next.plx +++ b/scripts/rt-outreachy-payment-next.plx @@ -95,7 +95,12 @@ while (my $file = readdir $dh) { next; } } - die "Inside $file there is no valid Date:" if (not defined $mentorDate); + if (not defined $mentorDate) { + print STDERR "\"$file\": Skipping: Inside that file there is no valid Date: header" ; + next; + } + + # Find the ticket number for this intern. my(@nameComponents) = split(/\s*-\s*/, $name); my(@searchTerms);