瀏覽代碼

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



Loading…
取消
儲存