Better error checking with Http.stockquote and remove Http.weather's tests.

This commit is contained in:
James Vega 2004-03-26 00:56:31 +00:00
parent a1e48a8ff7
commit f130db33cc
1 changed files with 3 additions and 0 deletions

View File

@ -172,6 +172,9 @@ class Http(callbacks.Privmsg):
previous day of a given compny (represented by a stock symbol).
"""
symbol = privmsgs.getArgs(args)
if ' ' in symbol:
irc.error('Only one stockquote can be looked up at a time.')
return
url = 'http://finance.yahoo.com/d/quotes.csv?s=%s' \
'&f=sl1d1t1c1ohgv&e=.csv' % symbol
quote = webutils.getUrl(url)