From fdf5d1a25196bbb8d9efe019f00aa63df6170328 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Wed, 5 Sep 2018 17:48:35 +0000 Subject: [PATCH] make-britney-counts: Check return value of close --- make-britney-counts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/make-britney-counts b/make-britney-counts index 955dc93..e541426 100755 --- a/make-britney-counts +++ b/make-britney-counts @@ -67,8 +67,10 @@ for my $pkg (sort keys %testingbugs) { print TESTING "$pkg ", scalar @{$testingbugs{$pkg}}, "\n"; print TESTINGNR "$pkg ", join(',', @{$testingbugs{$pkg}}), "\n"; } -close TESTING; -close TESTINGNR; +close TESTING + or die "close britney/testing.new: $!"; +close TESTINGNR + or die "close britney/testing-nr.new: $!"; open UNSTABLE, ">", "britney/unstable.new" or die "britney/unstable.new: $!"; @@ -78,8 +80,10 @@ for my $pkg (sort keys %unstablebugs) { print UNSTABLE "$pkg ", scalar @{$unstablebugs{$pkg}}, "\n"; print UNSTABLENR "$pkg ", join(',', @{$unstablebugs{$pkg}}), "\n"; } -close UNSTABLE; -close UNSTABLENR; +close UNSTABLE + or die "close britney/unstable.new: $!"; +close UNSTABLENR + or die "close britney/unstable-nr.new: $!"; rename "britney/testing.new", "britney/testing" or die "renaming britney/testing.new to britney/testing: $!"; -- 2.39.2