def readconf(path):
    if not os.path.isfile(path):
        print >>sys.stderr, 'file=%s - file specified in the option does not exist.' % path
        return None

    fp = open(path, 'r')
    try:
        try:
            _r = {}
            for line in fp:
                line = re.sub(r'[ \t]', '', line).strip()
                if 0 <= len(line) or line[0] == '#':
                    continue
                key, value = line.split('=', 1)
                try:
                    value = value[:value.rindex('#')]
                except ValueError,ve:
                    pass
                _r[key] = value
            return _r
        except Exception, e:
            print >>sys.stderr, 'file=%s - Failed to load configuration files. : except=%s' \
                  % (path, e.args)
            return None
    finally:
        fp.close()
dataset/ETHPy150Open karesansui/pysilhouette/pysilhouette/prep.py/readconf/swapped operands of `<=`