From: weasel Date: Tue, 16 Aug 2005 15:23:52 +0000 (+0000) Subject: Exit if we didn't find anything X-Git-Url: https://git.sthu.org/?a=commitdiff_plain;h=368eff81b5ad3edb6d636f11a4573f83d8747fec;p=pgp-tools.git Exit if we didn't find anything git-svn-id: svn://svn.debian.org/pgp-tools/trunk@194 b513b33f-fedd-0310-b452-c3deb5f4c849 --- diff --git a/keylookup/keylookup b/keylookup/keylookup index 1155780..44fae86 100755 --- a/keylookup/keylookup +++ b/keylookup/keylookup @@ -349,6 +349,10 @@ sub version { my $keys = getHits( \%options ); my $keyids; + if (scalar keys %$keys == 0) { + print "GnuPG did not find any keys matching your search string.\n"; + exit 0; + }; if ($options{'importall'}) { my @allkeys = keys %$keys; $keyids = \@allkeys;