Ver código fonte

A couple of fixes.

pull/8/merge
Ben Kurtovic 11 anos atrás
pai
commit
9add412871
1 arquivos alterados com 2 adições e 2 exclusões
  1. +2
    -2
      commands/weather.py

+ 2
- 2
commands/weather.py Ver arquivo

@@ -60,7 +60,7 @@ class Weather(Command):
msg = " ".join(("Where do you want the weather of? You can",
"set a default with '!{0} default City,",
"State' (or 'City, Country' if non-US)."))
self.reply(data, msg)
self.reply(data, msg.format(data.command))
return
elif data.args[0] == "default":
if data.args[1:]:
@@ -80,7 +80,7 @@ class Weather(Command):
location = " ".join(data.args)

url = "http://api.wunderground.com/api/{0}/conditions/q/{1}.json"
location = quote("_".join(location), safe="")
location = quote(location, safe="")
query = urlopen(url.format(self.key, location)).read()
res = loads(query)



Carregando…
Cancelar
Salvar