浏览代码

Fix parse_kwargs

tags/v0.1^2
Ben Kurtovic 12 年前
父节点
当前提交
3c9c63d573
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      earwigbot/irc/data.py

+ 2
- 2
earwigbot/irc/data.py 查看文件

@@ -90,11 +90,11 @@ class Data(object):
Parse a command given as "!command key1=value1 key2=value2..." into a
dict, self.kwargs, like {'key1': 'value2', 'key2': 'value2'...}.
"""
for arg in self.args[2:]:
for arg in self.args:
try:
key, value = re.findall("^(.*?)\=(.*?)$", arg)[0]
except IndexError:
pass
continue
if key and value:
self.kwargs[key] = value



正在加载...
取消
保存