[lintian] 02/03: L::Tags: Save a stat call by using "forgivness > permission"
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 0f4c5a6d198ef121de71d898313151f804e13dde
Author: Niels Thykier <niels@thykier.net>
Date: Fri Dec 30 21:23:33 2016 +0000
L::Tags: Save a stat call by using "forgivness > permission"
Signed-off-by: Niels Thykier <niels@thykier.net>
---
lib/Lintian/Tags.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/Lintian/Tags.pm b/lib/Lintian/Tags.pm
index 9ca25c7..9645667 100644
--- a/lib/Lintian/Tags.pm
+++ b/lib/Lintian/Tags.pm
@@ -26,6 +26,7 @@ use autodie;
use Carp qw(croak);
use Exporter qw(import);
use List::MoreUtils qw(any);
+use POSIX qw(ENOENT);
use Lintian::Architecture qw(:all);
use Lintian::Output;
@@ -704,8 +705,9 @@ sub load_overrides {
}
$lpkg = $self->{'info'}{$current}{'processable'};
$overrides_file = $lpkg->info->lab_data_path('override');
- if (-f $overrides_file) {
- $self->file_overrides($overrides_file);
+ eval {$self->file_overrides($overrides_file);};
+ if (my $err = $@) {
+ die $err if not ref $err or $err->errno != ENOENT;
}
return;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: