24d3cbdfe9f16fbf903259c2fb1870907cd5f9f5,homeassistant/components/switch/orvibo.py,,setup_platform,#Any#Any#Any#Any#,17

Before Change


    switch_conf = config.get("switches", [config])

    for switch in switch_conf:
        if switch.get("host") is None:
            _LOGGER.error("Missing required variable: host")
            continue
        host = switch.get("host")

After Change


    switches = []
    switch_conf = config.get(CONF_SWITCHES, [config])

    if config.get(CONF_DISCOVERY):
        _LOGGER.info("Discovering S20 switches ...")
        switch_data.update(discover())

    for switch in switch_conf:
        switch_data[switch.get(CONF_HOST)] = switch

    for host, data in switch_data.items():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: home-assistant/home-assistant
Commit Name: 24d3cbdfe9f16fbf903259c2fb1870907cd5f9f5
Time: 2016-09-01
Author: happyleaves.tfr@gmail.com
File Name: homeassistant/components/switch/orvibo.py
Class Name:
Method Name: setup_platform


Project Name: regel/loudml
Commit Name: a10c983c160d86eb15b44b89d2ed271c3e2debe0
Time: 2018-01-18
Author: vianney@redmintnetwork.fr
File Name: python/loudml_new/influx.py
Class Name: InfluxDataSource
Method Name: get_times_data


Project Name: OpenNMT/OpenNMT-tf
Commit Name: da5d72fe0f8dbe7d09958eed4ab880239a7b1511
Time: 2019-07-30
Author: guillaume.klein@systrangroup.com
File Name: opennmt/runner.py
Class Name: Runner
Method Name: train