mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-26 20:14:20 +01:00
Remove some tabs.
This commit is contained in:
parent
65b139dda9
commit
75d529872a
@ -132,9 +132,9 @@ class Bugzilla(callbacks.PrivmsgCommandAndRegexp, configurable.Mixin):
|
|||||||
query.append('priority=%s' % k.upper())
|
query.append('priority=%s' % k.upper())
|
||||||
elif k in severityKeys:
|
elif k in severityKeys:
|
||||||
query.append('bug_severity=%s' % k.upper())
|
query.append('bug_severity=%s' % k.upper())
|
||||||
|
|
||||||
query.append('ctype=csv')
|
query.append('ctype=csv')
|
||||||
return query
|
return query
|
||||||
|
|
||||||
def die(self):
|
def die(self):
|
||||||
self.db.close()
|
self.db.close()
|
||||||
configurable.Mixin.die(self)
|
configurable.Mixin.die(self)
|
||||||
|
@ -83,13 +83,13 @@ class Weather(callbacks.Privmsg):
|
|||||||
re.I | re.S)
|
re.I | re.S)
|
||||||
# States
|
# States
|
||||||
_realStates = sets.Set(['ak', 'al', 'ar', 'az', 'ca', 'co', 'ct',
|
_realStates = sets.Set(['ak', 'al', 'ar', 'az', 'ca', 'co', 'ct',
|
||||||
'dc', 'de', 'fl', 'ga', 'hi', 'ia', 'id',
|
'dc', 'de', 'fl', 'ga', 'hi', 'ia', 'id',
|
||||||
'il', 'in', 'ks', 'ky', 'la', 'ma', 'md',
|
'il', 'in', 'ks', 'ky', 'la', 'ma', 'md',
|
||||||
'me', 'mi', 'mn', 'mo', 'ms', 'mt', 'nc',
|
'me', 'mi', 'mn', 'mo', 'ms', 'mt', 'nc',
|
||||||
'nd', 'ne', 'nh', 'nj', 'nm', 'nv', 'ny',
|
'nd', 'ne', 'nh', 'nj', 'nm', 'nv', 'ny',
|
||||||
'oh', 'ok', 'or', 'pa', 'ri', 'sc', 'sd',
|
'oh', 'ok', 'or', 'pa', 'ri', 'sc', 'sd',
|
||||||
'tn', 'tx', 'ut', 'va', 'vt', 'wa', 'wi',
|
'tn', 'tx', 'ut', 'va', 'vt', 'wa', 'wi',
|
||||||
'wv', 'wy'])
|
'wv', 'wy'])
|
||||||
# Provinces. (Province being a metric state measurement mind you. :D)
|
# Provinces. (Province being a metric state measurement mind you. :D)
|
||||||
_fakeStates = sets.Set(['ab', 'bc', 'mb', 'nb', 'nf', 'ns', 'nt',
|
_fakeStates = sets.Set(['ab', 'bc', 'mb', 'nb', 'nf', 'ns', 'nt',
|
||||||
'nu', 'on', 'pe', 'qc', 'sk', 'yk'])
|
'nu', 'on', 'pe', 'qc', 'sk', 'yk'])
|
||||||
@ -124,20 +124,20 @@ class Weather(callbacks.Privmsg):
|
|||||||
else:
|
else:
|
||||||
country = state
|
country = state
|
||||||
state = ''
|
state = ''
|
||||||
if country in self._countryMap.keys():
|
if country in self._countryMap.keys():
|
||||||
country = self._countryMap[country]
|
country = self._countryMap[country]
|
||||||
url = 'http://www.hamweather.net/cgi-bin/hw3/hw3.cgi?' \
|
url = 'http://www.hamweather.net/cgi-bin/hw3/hw3.cgi?' \
|
||||||
'pass=&dpp=&forecast=zandh&config=&' \
|
'pass=&dpp=&forecast=zandh&config=&' \
|
||||||
'place=%s&state=%s&country=%s' % (city, state, country)
|
'place=%s&state=%s&country=%s' % (city, state, country)
|
||||||
html = webutils.getUrl(url)
|
html = webutils.getUrl(url)
|
||||||
if 'was not found' in html:
|
if 'was not found' in html:
|
||||||
url = 'http://www.hamweather.net/cgi-bin/hw3/hw3.cgi?' \
|
url = 'http://www.hamweather.net/cgi-bin/hw3/hw3.cgi?' \
|
||||||
'pass=&dpp=&forecast=zandh&config=&' \
|
'pass=&dpp=&forecast=zandh&config=&' \
|
||||||
'place=%s&state=&country=%s' % (city, state)
|
'place=%s&state=&country=%s' % (city, state)
|
||||||
html = webutils.getUrl(url)
|
html = webutils.getUrl(url)
|
||||||
if 'was not found' in html:
|
if 'was not found' in html: # Still.
|
||||||
irc.error('No such location could be found.')
|
irc.error('No such location could be found.')
|
||||||
return
|
return
|
||||||
|
|
||||||
#We received a single argument. Zipcode or station id.
|
#We received a single argument. Zipcode or station id.
|
||||||
else:
|
else:
|
||||||
@ -147,20 +147,20 @@ class Weather(callbacks.Privmsg):
|
|||||||
url = 'http://www.hamweather.net/cgi-bin/hw3/hw3.cgi?' \
|
url = 'http://www.hamweather.net/cgi-bin/hw3/hw3.cgi?' \
|
||||||
'config=&forecast=zandh&pands=%s&Submit=GO' % args[0]
|
'config=&forecast=zandh&pands=%s&Submit=GO' % args[0]
|
||||||
html = webutils.getUrl(url)
|
html = webutils.getUrl(url)
|
||||||
if 'was not found' in html:
|
if 'was not found' in html:
|
||||||
irc.error('No such location could be found.')
|
irc.error('No such location could be found.')
|
||||||
return
|
return
|
||||||
|
|
||||||
headData = self._cityregex.search(html)
|
headData = self._cityregex.search(html)
|
||||||
if headData:
|
if headData:
|
||||||
(city, state, country) = headData.groups()
|
(city, state, country) = headData.groups()
|
||||||
else:
|
else:
|
||||||
headData = self._interregex.search(html)
|
headData = self._interregex.search(html)
|
||||||
if headData:
|
if headData:
|
||||||
(city, state) = headData.groups()
|
(city, state) = headData.groups()
|
||||||
else:
|
else:
|
||||||
irc.error('No such location could be found.')
|
irc.error('No such location could be found.')
|
||||||
return
|
return
|
||||||
|
|
||||||
city = city.strip()
|
city = city.strip()
|
||||||
state = state.strip()
|
state = state.strip()
|
||||||
|
Loading…
Reference in New Issue
Block a user