a2c6dbf4794b21e50c025462be61c08cf17e7c1c,homeassistant/components/mqtt.py,,setup,#Any#Any#,78

Before Change


                           _LOGGER):
        return False

    if mqtt is None:
        _LOGGER.error("Error while importing dependency "paho-mqtt".")
        return False

    global MQTT_CLIENT

    broker = config[DOMAIN]["broker"]
    port = config[DOMAIN].get("port", MQTT_DEFAULT_PORT)
    topic = config[DOMAIN]["topic"]
    keepalive = config[DOMAIN].get("keepalive", MQTT_DEFAULT_KEEPALIVE)
    qos = config[DOMAIN].get("qos", MQTT_DEFAULT_QOS)

    MQTT_CLIENT = MQTT(hass, broker, port, topic, keepalive, qos,
                       MQTT_CLIENT_ID)

After Change


    broker = conf[CONF_BROKER]
    port = util.convert(conf.get(CONF_PORT), int, DEFAULT_PORT)
    topic = util.convert(conf.get(CONF_TOPIC), str, DEFAULT_TOPIC)
    keepalive = util.convert(conf.get(CONF_KEEPALIVE), int, DEFAULT_KEEPALIVE)
    qos = util.convert(conf.get(CONF_QOS), int, DEFAULT_QOS)

    global MQTT_CLIENT
    try:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: home-assistant/home-assistant
Commit Name: a2c6dbf4794b21e50c025462be61c08cf17e7c1c
Time: 2015-08-08
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/mqtt.py
Class Name:
Method Name: setup


Project Name: tsurumeso/waifu2x-chainer
Commit Name: 96d99ac0a6b0810147d8d6e2647be926a131457e
Time: 2018-02-25
Author: tsurumeso@gmail.com
File Name: lib/reconstruct.py
Class Name:
Method Name: image_tta


Project Name: home-assistant/home-assistant
Commit Name: 35f0270688d2bd1e31e45ebbc1771f1ff940bff6
Time: 2015-07-16
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/sun.py
Class Name:
Method Name: setup