def properties_loader(filename):
    split_pattern = re.compile(r'[=:]')

    def parse_line(line):
        line = line.strip()
        if not line or line.startswith('#'):
            return

        try:
            key, value = split_pattern.split(line, 1)
        except ValueError:
            msg = line % "Invalid properties line: %s"
            raise errors.ConfigurationError(msg)
        return key.strip(), value.strip()

    with open(filename) as fh:
        return dict(filter(None, (parse_line(line) for line in fh)))
dataset/ETHPy150Open dnephin/PyStaticConfiguration/staticconf/loader.py/properties_loader/swapped operands of `%`