Ver código fonte

Fix parse_kwargs

tags/v0.1^2
Ben Kurtovic 12 anos atrás
pai
commit
3c9c63d573
1 arquivos alterados com 2 adições e 2 exclusões
  1. +2
    -2
      earwigbot/irc/data.py

+ 2
- 2
earwigbot/irc/data.py Ver arquivo

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



Carregando…
Cancelar
Salvar