From: weasel Date: Tue, 28 Jun 2005 14:57:30 +0000 (+0000) Subject: Warn if we do not find a public key, not only if we get no output at all (tru:..... X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=5123d7a225d40ab965e573809acb3c6b6a65f0dd;p=pgp-tools.git Warn if we do not find a public key, not only if we get no output at all (tru:.. is output) git-svn-id: svn://svn.debian.org/pgp-tools/trunk@90 b513b33f-fedd-0310-b452-c3deb5f4c849 --- diff --git a/caff/caff b/caff/caff index 4bbab0a..ec6b6f4 100755 --- a/caff/caff +++ b/caff/caff @@ -641,6 +641,10 @@ for my $keyid (@keyids_ok) { next; }; my @publine = grep { /^pub/ } (split /\n/, $stdout); + if (scalar @publine == 0) { + warn ("No public keys found with list-key $keyid (note that caff uses its own keyring in $GNUPGHOME).\n"); + next; + }; my (undef, undef, undef, undef, $longkeyid, undef, undef, undef, undef, undef, undef, $flags) = split /:/, pop @publine; if (scalar @publine > 0) { warn ("More than one key matched $keyid. Try to specify the long keyid or fingerprint\n");