浏览代码

A couple of fixes.

pull/8/merge
Ben Kurtovic 11 年前
父节点
当前提交
9add412871
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      commands/weather.py

+ 2
- 2
commands/weather.py 查看文件

@@ -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)



正在加载...
取消
保存