Fixing modules key in info command
When modules are present, INFO's response will contain a `modules` key which will be a list of dicts describing each module.
@@ -141,6 +141,12 @@ def parse_info(response):
key, value = line.split(':', 1)
if key == 'cmdstat_host':
key, value = line.rsplit(':', 1)
+
+ if key == 'module':
+ # Hardcode a list for key 'modules' since there could be
+ # multiple lines that started with 'module'
+ info.setdefault('modules', []).append(get_value(value))
+ else:
info[key] = get_value(value)
else:
# if the line isn't splittable, append it to the "__raw__" key
