def parse_params(option, opt, value, parser):
    try:
        args_dict = json.loads(value)
    except __HOLE__:
        print "argument error, %s should be valid JSON" % value

    setattr(parser.values, option.dest, args_dict)
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/hqadmin/management/commands/make_supervisor_conf.py/parse_params