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