a2b6af809af52297557fcb7b064e63bd4a19d2a1,Software/Python/easygopigo3.py,DHTSensor,read_humidity,#DHTSensor#,2748

Before Change


        """
        from di_sensors import DHT

        _grab_read()
        humidity = DHT.dht(self.sensor_type)[1]
        _release_read()

        if humidity == -2:

After Change


        """
        from di_sensors import DHT

        try:
            _grab_read()
            humidity = DHT.dht(self.sensor_type)[1]
        except Exception as e:
            raise
        finally:
            _release_read()

        if humidity == -2:
            return "Bad reading, trying again"
        elif humidity == -3:
            return "Run the program as sudo"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: DexterInd/GoPiGo3
Commit Name: a2b6af809af52297557fcb7b064e63bd4a19d2a1
Time: 2017-08-29
Author: cleoqc1124@gmail.com
File Name: Software/Python/easygopigo3.py
Class Name: DHTSensor
Method Name: read_humidity


Project Name: DexterInd/GoPiGo3
Commit Name: a2b6af809af52297557fcb7b064e63bd4a19d2a1
Time: 2017-08-29
Author: cleoqc1124@gmail.com
File Name: Software/Python/easygopigo3.py
Class Name: DHTSensor
Method Name: read


Project Name: DexterInd/GoPiGo3
Commit Name: a2b6af809af52297557fcb7b064e63bd4a19d2a1
Time: 2017-08-29
Author: cleoqc1124@gmail.com
File Name: Software/Python/easygopigo3.py
Class Name: DHTSensor
Method Name: read_temperature