def chkopts(opts):
    if not opts.module:
        raise KssCommandOptException("ERROR: -m or --module option is required.")

    modules = opts.module.split(":")
    for _mod in modules:
        try:
            exec("from karesansui.lib.parser.%s import %sParser" % (_mod,_mod,))
        except:
            raise KssCommandOptException(opts.module % "ERROR: module not found. - %s")

    if not opts.file:
        opts.file = "/dev/stdout"
        for _cnt in range(1,len(modules)):
            opts.file = "%s:/dev/stdout" % opts.file

    files = opts.file.split(":")

    if len(modules) != len(files):
        raise KssCommandOptException("ERROR: not same number of modules and files. - module:%d file:%d" % (len(modules),len(files),))

    if opts.raw is True and opts.php is True:
        raise KssCommandOptException("ERROR: cannot specify --raw and --php option at same time.")
dataset/ETHPy150Open karesansui/karesansui/bin/read_conf.py/chkopts/swapped operands of `%`