From 3a3227298dcd4faabd93e6f4bcaede10f29b13fd Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 25 Sep 2004 02:51:55 -0400 Subject: if a commodity price cannot be downloaded, report it as an error --- scripts/getquote | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'scripts/getquote') diff --git a/scripts/getquote b/scripts/getquote index cf8c8abd..8daf6633 100755 --- a/scripts/getquote +++ b/scripts/getquote @@ -1,16 +1,14 @@ #!/usr/bin/perl -exit 0 if $ARGV[0] eq "\$"; - use Finance::Quote; $q = Finance::Quote->new; - $q->timeout(60); $q->require_labels(qw/price/); %quotes = $q->fetch("nasdaq", $ARGV[0]); - if ($quotes{$ARGV[0], "price"}) { print "\$", $quotes{$ARGV[0], "price"}, "\n"; +} else { + exit 1; } -- cgit v1.2.3