Remove some tabs.

This commit is contained in:
Jeremy Fincher 2004-01-11 14:47:44 +00:00
parent 65b139dda9
commit 75d529872a
2 changed files with 28 additions and 28 deletions

View File

@ -132,9 +132,9 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp, configurable.Mixin):
query.append('priority=%s' % k.upper())
elif k in severityKeys:
query.append('bug_severity=%s' % k.upper())
query.append('ctype=csv')
return query
def die(self):
self.db.close()
configurable.Mixin.die(self)

View File

@ -83,13 +83,13 @@ class Weather(callbacks.Privmsg):
re.I | re.S)
# States
_realStates = sets.Set(['ak', 'al', 'ar', 'az', 'ca', 'co', 'ct',
'dc', 'de', 'fl', 'ga', 'hi', 'ia', 'id',
'il', 'in', 'ks', 'ky', 'la', 'ma', 'md',
'me', 'mi', 'mn', 'mo', 'ms', 'mt', 'nc',
'nd', 'ne', 'nh', 'nj', 'nm', 'nv', 'ny',
'oh', 'ok', 'or', 'pa', 'ri', 'sc', 'sd',
'tn', 'tx', 'ut', 'va', 'vt', 'wa', 'wi',
'wv', 'wy'])
'dc', 'de', 'fl', 'ga', 'hi', 'ia', 'id',
'il', 'in', 'ks', 'ky', 'la', 'ma', 'md',
'me', 'mi', 'mn', 'mo', 'ms', 'mt', 'nc',
'nd', 'ne', 'nh', 'nj', 'nm', 'nv', 'ny',
'oh', 'ok', 'or', 'pa', 'ri', 'sc', 'sd',
'tn', 'tx', 'ut', 'va', 'vt', 'wa', 'wi',
'wv', 'wy'])
# Provinces. (Province being a metric state measurement mind you. :D)
_fakeStates = sets.Set(['ab', 'bc', 'mb', 'nb', 'nf', 'ns', 'nt',
'nu', 'on', 'pe', 'qc', 'sk', 'yk'])
@ -124,20 +124,20 @@ class Weather(callbacks.Privmsg):
else:
country = state
state = ''
if country in self._countryMap.keys():
country = self._countryMap[country]
if country in self._countryMap.keys():
country = self._countryMap[country]
url = 'http://www.hamweather.net/cgi-bin/hw3/hw3.cgi?' \
'pass=&dpp=&forecast=zandh&config=&' \
'place=%s&state=%s&country=%s' % (city, state, country)
html = webutils.getUrl(url)
if 'was not found' in html:
url = 'http://www.hamweather.net/cgi-bin/hw3/hw3.cgi?' \
'pass=&dpp=&forecast=zandh&config=&' \
'place=%s&state=&country=%s' % (city, state)
html = webutils.getUrl(url)
if 'was not found' in html:
irc.error('No such location could be found.')
return
html = webutils.getUrl(url)
if 'was not found' in html:
url = 'http://www.hamweather.net/cgi-bin/hw3/hw3.cgi?' \
'pass=&dpp=&forecast=zandh&config=&' \
'place=%s&state=&country=%s' % (city, state)
html = webutils.getUrl(url)
if 'was not found' in html: # Still.
irc.error('No such location could be found.')
return
#We received a single argument. Zipcode or station id.
else:
@ -147,20 +147,20 @@ class Weather(callbacks.Privmsg):
url = 'http://www.hamweather.net/cgi-bin/hw3/hw3.cgi?' \
'config=&forecast=zandh&pands=%s&Submit=GO' % args[0]
html = webutils.getUrl(url)
if 'was not found' in html:
irc.error('No such location could be found.')
return
if 'was not found' in html:
irc.error('No such location could be found.')
return
headData = self._cityregex.search(html)
if headData:
(city, state, country) = headData.groups()
else:
headData = self._interregex.search(html)
if headData:
(city, state) = headData.groups()
else:
irc.error('No such location could be found.')
return
if headData:
(city, state) = headData.groups()
else:
irc.error('No such location could be found.')
return
city = city.strip()
state = state.strip()