[lintian] 01/01: c/nmu: Use $info->field with default value
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit 6efd7cc40343021908b093fe9ab9d3a1e8698432
Author: Niels Thykier <niels@thykier.net>
Date: Fri Feb 12 18:42:48 2016 +0000
c/nmu: Use $info->field with default value
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/nmu.pm | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/checks/nmu.pm b/checks/nmu.pm
index 52be4e1..cd74403 100644
--- a/checks/nmu.pm
+++ b/checks/nmu.pm
@@ -70,17 +70,15 @@ sub run {
$changelog_mentions_team_upload = 1 if /team upload/i;
}
- my $version = $info->field('version');
+ # If the version field is missing, assume it to be a native,
+ # maintainer upload as it is probably the most likely case.
+ my $version = $info->field('version', '0-1');
my $maintainer = canonicalize($info->field('maintainer', ''));
my $uploaders = $info->field('uploaders');
my $version_nmuness = 0;
my $version_local = 0;
- # If the version field is missing, assume it to be a native,
- # maintainer upload as it is probably the most likely case.
- $version = '0-1' unless defined $version;
-
if ($version =~ /-[^.-]+(\.[^.-]+)?(\.[^.-]+)?$/) {
$version_nmuness = 1 if defined $1;
$version_nmuness = 2 if defined $2;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: