[lintian] 02/02: harness: Use open_gz to open gzip files
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 17ab725d22c108a6cbd8a622ef581388450738e2
Author: Niels Thykier <niels@thykier.net>
Date: Thu Sep 26 08:42:46 2013 +0200
harness: Use open_gz to open gzip files
Signed-off-by: Niels Thykier <niels@thykier.net>
---
reporting/harness | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/reporting/harness b/reporting/harness
index 1241e16..588d276 100755
--- a/reporting/harness
+++ b/reporting/harness
@@ -122,7 +122,7 @@ require Lintian::Processable;
require Lintian::Relation::Version;
import Lintian::Relation::Version qw(versions_lt);
require Lintian::Util;
-import Lintian::Util qw(strip visit_dpkg_paragraph);
+import Lintian::Util qw(open_gz strip visit_dpkg_paragraph);
# turn file buffering off
STDOUT->autoflush;
@@ -565,13 +565,8 @@ sub _open_data_file {
open my $fd, '<', $file or Die "opening $file: $!";
return $fd;
}
- foreach my $com (['gz', ['gzip', '-dc']]){
- my ($ext, $cmd) = @$com;
- if (-e "$file.$ext") {
- open my $c, '-|', @$cmd, "$file.$ext"
- or Die "running @$cmd $file.$ext";
- return $c;
- }
+ if (-e "$file.gz") {
+ return open_gz("$file.gz");
}
Die "Cannot find $file";
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: