ecc249aa27a8177ba2a9050465fd35319f7e1b24,homeassistant/components/sensor/usps.py,,setup_platform,#Any#Any#Any#Any#,38

Before Change


    Setup the USPS platform.
    import myusps
    try:
        cookie = hass.config.path(COOKIE)
        session = myusps.get_session(
            config.get(CONF_USERNAME), config.get(CONF_PASSWORD),
            cookie_path=cookie)
    except myusps.USPSError:
        _LOGGER.exception("Could not connect to My USPS")
        return False

After Change



def setup_platform(hass, config, add_devices, discovery_info=None):
    Setup the USPS platform.
    if discovery_info is None:
        return

    usps = hass.data[DATA_USPS]
    add_devices([USPSPackageSensor(usps),
                 USPSMailSensor(usps)], True)

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: home-assistant/home-assistant
Commit Name: ecc249aa27a8177ba2a9050465fd35319f7e1b24
Time: 2017-08-18
Author: mezz@johnmihalic.com
File Name: homeassistant/components/sensor/usps.py
Class Name:
Method Name: setup_platform


Project Name: pantsbuild/pants
Commit Name: 0a6edd21b9ab29a1f733b90ff15092e7a03f665d
Time: 2014-01-15
Author: jsirois@twitter.com
File Name: src/python/twitter/pants/python/thrift_builder.py
Class Name: PythonThriftBuilder
Method Name: __init__


Project Name: pantsbuild/pants
Commit Name: 3f5e994767718a930681d75bd59154525b02cd18
Time: 2014-01-19
Author: benjyw@gmail.com
File Name: src/python/twitter/pants/python/thrift_builder.py
Class Name: PythonThriftBuilder
Method Name: __init__