def test_prop(section, prop):

    config = ConfigParser.ConfigParser()
    config.read(CONFIG_FILE_NAME)

    try:
        config.get(section, prop)
        return 1
    except ConfigParser.NoSectionError:
        return 0
    except ConfigParser.NoOptionError:
        return 0

    # Some other error?
    return 0
Test if a property is set or not
dataset/ETHPy150Open jakev/dtf/src/dtf/properties.py/test_prop