diff --git a/configargparse.py b/configargparse.py index b447396..8a39ed6 100644 --- a/configargparse.py +++ b/configargparse.py @@ -316,6 +316,8 @@ def parse(self, stream): for key, value in parsed_obj.items(): if isinstance(value, list): result[key] = value + elif isinstance(value, dict): + result[key] = value elif value is None: pass else: @@ -837,6 +839,8 @@ def convert_item_to_command_line_arg(self, action, key, value): "to 'append' or nargs is set to '*', '+', or > 1") % (key, value)) elif isinstance(value, str): args.append( "%s=%s" % (command_line_key, value) ) + elif isinstance(value, dict): + args.append( "%s=%s" % (command_line_key, value) ) else: raise ValueError("Unexpected value type {} for value: {}".format( type(value), value))