97f81ad7a667ea2aa1b292c1defbe34e689a29e5,homeassistant/components/sensor/swiss_public_transport.py,PublicTransportData,update,#PublicTransportData#,87

Before Change


        connections = response.json()["connections"][:2]

        try:
            return [
                dt_util.datetime_to_time_str(
                    dt_util.as_local(dt_util.utc_from_timestamp(
                        item["from"]["departureTimestamp"]))
                )
                for item in connections
            ]
        except KeyError:
            return ["n/a"]

After Change


            ]
            self.times.append(
                dt_util.as_local(
                    dt_util.utc_from_timestamp(
                        connections[0]["from"]["departureTimestamp"])) -
                dt_util.as_local(dt_util.utcnow()))
        except KeyError:
            self.times = ["n/a"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: home-assistant/home-assistant
Commit Name: 97f81ad7a667ea2aa1b292c1defbe34e689a29e5
Time: 2015-10-23
Author: fabian@affolter-engineering.ch
File Name: homeassistant/components/sensor/swiss_public_transport.py
Class Name: PublicTransportData
Method Name: update


Project Name: home-assistant/home-assistant
Commit Name: 458838e9c63688637bb765ce7d18142affb12148
Time: 2015-06-02
Author: fabian@affolter-engineering.ch
File Name: homeassistant/components/sensor/swiss_public_transport.py
Class Name: PublicTransportData
Method Name: update


Project Name: home-assistant/home-assistant
Commit Name: 512c4629b66dc3931c3ba36979f6ca6d08885bfe
Time: 2015-06-02
Author: fabian@affolter-engineering.ch
File Name: homeassistant/components/sensor/swiss_public_transport.py
Class Name: PublicTransportData
Method Name: update